NOTE: code that prints this and detail is difficult in J2ME
500580
public void printStackTrace() {
        if (detail == null) {
            super.printStackTrace();
        } else {
            synchronized(System.err) {
                System.err.println(super.getMessage() + "; nested exception is:");
                detail.printStackTrace();
            }
        }
    }
364365
def print_object(self, d, h, n, nl=False):
        
        s = []
        cls = d.__class__
        md = d.__metadata__
        if d in h:
            s.append('(')
            s.append(cls.__name__)
            s.append(')')
            s.append('...')
            return ''.join(s)
        h.append(d)
        if nl:
            s.append('\n')
            s.append(self.indent(n))
        if cls != Object:
            s.append('(')
            if isinstance(d, Facade):
                s.append(md.facade)
            else:
                s.append(cls.__name__)
            s.append(')')
        s.append('{')
        for item in d:
            if self.exclude(d, item):
                continue
            item = self.unwrap(d, item)
            s.append('\n')
            s.append(self.indent(n+1))
            if isinstance(item[1], (list, tuple)):
                s.append(item[0])
                s.append('[]')
            else:
                s.append(item[0])
            s.append(' = ')
            s.append(self.process(item[1], h, n, True))
        s.append('\n')
        s.append(self.indent(n))
        s.append('}')
        h.pop()
        return ''.join(s)
164856
function printNodes(node, indent) {
    indent = indent || 0;

    // This is hacky, but this is just a debugging function anyway
    function print(str, indent, inline) {
        var lines = str.split('\n');

        for(var i=0; i<lines.length; i++) {
            if(lines[i]) {
                if((inline && i > 0) || !inline) {
                    for(var j=0; j<indent; j++) {
                        process.stdout.write(' ');
                    }
                }
            }

            if(i === lines.length-1) {
                process.stdout.write(lines[i]);
            }
            else {
                process.stdout.write(lines[i] + '\n');
            }
        }
    }

    print(node.typename + ': ', indent);

    if(node instanceof NodeList) {
        print('\n');
        lib.each(node.children, function(n) {
            printNodes(n, indent + 2);
        });
    }
    else if(node instanceof CallExtension) {
        print(node.extName + '.' + node.prop);
        print('\n');

        if(node.args) {
            printNodes(node.args, indent + 2);
        }

        if(node.contentArgs) {
            lib.each(node.contentArgs, function(n) {
                printNodes(n, indent + 2);
            });
        }
    }
    else {
        var nodes = null;
        var props = null;

        node.iterFields(function(val, field) {
            if(val instanceof Node) {
                nodes = nodes || {};
                nodes[field] = val;
            }
            else {
                props = props || {};
                props[field] = val;
            }
        });

        if(props) {
            print(JSON.stringify(props, null, 2) + '\n', null, true);
        }
        else {
            print('\n');
        }

        if(nodes) {
            for(var k in nodes) {
                printNodes(nodes[k], indent + 2);
            }
        }

    }
}
655891
def line_print(self):
        
        inv_types = {v: k for k, v in defines.Types.items()}

        if self._code is None:
            self._code = defines.Codes.EMPTY.number

        msg = "From {source}, To {destination}, {type}-{mid}, {code}-{token}, ["\
            .format(source=self._source, destination=self._destination, type=inv_types[self._type], mid=self._mid,
                    code=defines.Codes.LIST[self._code].name, token=self._token)
        for opt in self._options:
            msg += "{name}: {value}, ".format(name=opt.name, value=opt.value)
        msg += "]"
        if self.payload is not None:
            if isinstance(self.payload, dict):
                tmp = list(self.payload.values())[0][0:20]
            else:
                tmp = self.payload[0:20]
            msg += " {payload}...{length} bytes".format(payload=tmp, length=len(self.payload))
        else:
            msg += " No payload"
        return msg
581101
private int coding(final String unit) throws KNXFormatException
	{
		expUnitAdjustment = 0;
		// @formatter:off
		switch (unit) {
		case "Wh": return 0b00000000;
		case "MWh": expUnitAdjustment = 6; return 0b10000000;
		case "kJ": expUnitAdjustment = 3; return 0b00001000;
		case "GJ": expUnitAdjustment = 9; return 0b10001000;
		case "l": expUnitAdjustment = -3; return 0b00010000;
		case "kg": return 0b00011000;
		case "W": return 0b00101000;
		case "MW": expUnitAdjustment = 6; return 0b10101000;
		case "kJ/h": expUnitAdjustment = 3; return 0b00110000;
		case "GJ/h": expUnitAdjustment = 9; return 0b10110000;
		case "l/h": expUnitAdjustment = -3; return 0b00111000;
		case "l/min": expUnitAdjustment = -3; return 0b01000000;
		case "ml/s": expUnitAdjustment = -6; return 0b01001000;
		case "kg/h": return 0b01010000;
//		case "": return 0b01101110; // 'units for HCA', we will opt for 'dimensionless counter'
		case "": return dimensionlessCounter;
		default: throw newException("unsupported unit", unit);
		}
		// @formatter:on
	}
476135
function prettyPrint0(fs, indent) {
    logger.debug('prettyPrint0: ' + fs);
    var result = '';

    if (fs) {
      if (Object.keys(fs.incoming).length > 1) {
        if (fs.printed) {
          // Return the label
          return (fs.getLabel());
        }
        else {
          // Print the label
          result += fs.getLabel() + space;
          indent += fs.getLabel().length + 1;
          // and continue to print the substructure
        }
      }
      // mark the current node as printed
      fs.printed = true;

      if (!Object.keys(fs.features).length) {
        logger.debug('prettyPrint0() ' + fs.type.name);
        result += (debug ? fs.getLabel() : '');
        if (fs.type === signature.typeLattice.string) {
          // Print the lexical string
          result += '\"' + fs.lexicalString + '\"';
        }
        else {
          if (fs.type === signature.typeLattice.list) {
            // Distinguish ordinary references from list of references
            if (fs.listOfCrossRefs) {
              // Print the list of cross references
              result += '<';
              fs.listOfCrossRefs.forEach(function (ref) {
                if (ref.printed) {
                  result += ref.getLabel() + ', ';
                }
                else { // Print the referred fs
                  result += prettyPrint0(ref, indent + 1) + ',\n';
                }
              });
              // Remove the last comma plus space, if necessary
              if (fs.listOfCrossRefs.length) {
                result = result.substr(0, result.length - 2);
              }
              result += '>';
            }
            else {
              // Print the type
              result += fs.type.prettyPrint();
            }
          }
          else {
            if (fs.type === signature.typeLattice.concatlist) {
              // Print concatenation of lists of cross referenced nodes
              if (fs.listOfCrossRefs) {
                result += '<';
                var nrPrinted = 0;
                fs.listOfCrossRefs.forEach(function (ref) {
                  if (ref.printed) {
                    result += ref.getLabel() + ' + ';
                  }
                  else {
                    result += prettyPrint0(ref, indent + 1) + ' +\n';
                  }
                  nrPrinted++;
                });
                // Remove the last comma plus space, if one or more elements
                // were printed
                if (nrPrinted) {
                  result = result.substr(0, result.length - 3);
                }
                result += '>';
              }
              else {
                // Print the type
                result += fs.type.prettyPrint();
              }
            }
            else {
              // Print the type
              result += fs.type.prettyPrint();
            }
          }
        }
      }
      else {
        // Print the substructure
        result += '[' + (debug ? fs.getLabel() : '');
        Object.keys(fs.features).forEach(function (feature, index) {
          if (index === 0) {
            // first print the type of the substructure
            logger.debug('prettyPrint0(): ' + fs.type.name);
            result += fs.type.prettyPrint() + '\n'; // + ' (incoming: ' +' +
            //' Object.keys(fs.incoming).length + ')' + '\n';
            result += space.repeat(indent + 1);
            result += feature + ':' + space;
            result += prettyPrint0(fs.features[feature], indent + feature.length + 3) + '\n';
          }
          else {
            result += space.repeat(indent + 1) + feature + ':' + space;
            result += prettyPrint0(fs.features[feature], indent + feature.length + 3) + '\n';
          }
        });
        result += space.repeat(indent) + ']';
      }
    }
    else {
      result += 'WARNING: empty fs\n';
    }
    return (result);
  }
786277
@Override
    public void print(MoneyPrintContext context, Appendable appendable, BigMoney money) throws IOException {
        MoneyAmountStyle activeStyle = style.localize(context.getLocale());
        if (money.isNegative()) {
            money = money.negated();
            if (!activeStyle.isAbsValue()) {
                appendable.append(activeStyle.getNegativeSignCharacter());
            }
        }
        String str = money.getAmount().toPlainString();
        char zeroChar = activeStyle.getZeroCharacter();
        if (zeroChar != '0') {
            int diff = zeroChar - '0';
            StringBuilder zeroConvert = new StringBuilder(str);
            for (int i = 0; i < str.length(); i++) {
                char ch = str.charAt(i);
                if (ch >= '0' && ch <= '9') {
                    zeroConvert.setCharAt(i, (char) (ch + diff));
                }
            }
            str = zeroConvert.toString();
        }
        final int decPoint = str.indexOf('.');
        final int afterDecPoint = decPoint + 1;
        if (activeStyle.getGroupingStyle() == GroupingStyle.NONE) {
            if (decPoint < 0) {
                appendable.append(str);
                if (activeStyle.isForcedDecimalPoint()) {
                    appendable.append(activeStyle.getDecimalPointCharacter());
                }
            } else {
                appendable.append(str.subSequence(0, decPoint))
                    .append(activeStyle.getDecimalPointCharacter()).append(str.substring(afterDecPoint));
            }
        } else {
            int groupingSize = activeStyle.getGroupingSize();
            int extendedGroupingSize = activeStyle.getExtendedGroupingSize();
            extendedGroupingSize = extendedGroupingSize == 0 ? groupingSize : extendedGroupingSize;
            char groupingChar = activeStyle.getGroupingCharacter();
            int pre = (decPoint < 0 ? str.length() : decPoint);
            int post = (decPoint < 0 ? 0 : str.length() - decPoint - 1);
            appendable.append(str.charAt(0));
            for (int i = 1; i < pre; i++) {
                if (isPreGroupingPoint(pre - i, groupingSize, extendedGroupingSize)) {
                    appendable.append(groupingChar);
                }
                appendable.append(str.charAt(i));
            }
            if (decPoint >= 0 || activeStyle.isForcedDecimalPoint()) {
                appendable.append(activeStyle.getDecimalPointCharacter());
            }
            if (activeStyle.getGroupingStyle() == GroupingStyle.BEFORE_DECIMAL_POINT) {
                if (decPoint >= 0) {
                    appendable.append(str.substring(afterDecPoint));
                }
            } else {
                for (int i = 0; i < post; i++) {
                    appendable.append(str.charAt(i + afterDecPoint));
                    if (isPostGroupingPoint(i, post, groupingSize, extendedGroupingSize)) {
                        appendable.append(groupingChar);
                    }
                }
            }
        }
    }
667305
def printAllElements(self):
        
        cnt = 1
        print("{id:<3s}: {name:<12s} {type:<10s} {classname:<10s}"
              .format(id='ID', name='Name', type='Type', classname='Class Name'))
        for e in self._lattice_eleobjlist:
            print("{cnt:>03d}: {name:<12s} {type:<10s} {classname:<10s}"
                  .format(cnt=cnt, name=e.name, type=e.typename, classname=e.__class__.__name__))
            cnt += 1
1329844
@Override
    public void print(
        ChronoDisplay context,
        Appendable buffer,
        AttributeQuery attributes
    ) throws IOException, ChronoException {

        NumberSystem numsys = getNumberSystem(attributes);
        TextWidth width = attributes.get(Attributes.TEXT_WIDTH, TextWidth.NARROW);
        int minDigits;
        switch (width) {
            case NARROW:
                minDigits = 1;
                break;
            case SHORT:
                minDigits = 2;
                break;
            case ABBREVIATED:
                minDigits = 3;
                break;
            default:
                minDigits = 4;
        }
        char zeroChar = (
            attributes.contains(Attributes.ZERO_DIGIT)
                ? attributes.get(Attributes.ZERO_DIGIT).charValue()
                : (numsys.isDecimal() ? numsys.getDigits().charAt(0) : '0'));
        this.print(context, buffer, attributes, numsys, zeroChar, minDigits, 10);

    }
717179
def __PrintMessageDocstringLines(self, message_type):
        """"""
        description = message_type.description or '%s message type.' % (
            message_type.name)
        short_description = (
            _EmptyMessage(message_type) and
            len(description) < (self.__printer.CalculateWidth() - 6))
        with self.__printer.CommentContext():
            if short_description:
                # Note that we use explicit string interpolation here since
                # we're in comment context.
                self.__printer('r"""%s"""' % description)
                return
            for line in textwrap.wrap('r"""%s' % description,
                                      self.__printer.CalculateWidth()):
                self.__printer(line)

            PrintIndentedDescriptions(self.__printer, message_type.enum_types,
                                      'Enums')
            PrintIndentedDescriptions(
                self.__printer, message_type.message_types, 'Messages')
            PrintIndentedDescriptions(
                self.__printer, message_type.fields, 'Fields')
            self.__printer('"""')
            self.__printer()
291358
def pretty_print(self):
        
        return u"%s\t%.3f\t%.3f\t%s" % (
            (self.identifier or u""),
            (self.begin if self.begin is not None else TimeValue("-2.000")),
            (self.end if self.end is not None else TimeValue("-1.000")),
            (self.text or u"")
        )
1292492
@Override
	public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
		SelectMultiMenu menu = (SelectMultiMenu) component;

		if (!menu.isRendered()) {
			return;
		}
		ResponseWriter rw = context.getResponseWriter();
		String clientId = menu.getClientId(context).replace(":", "-");
		String span=null;
		boolean clientIdHasBeenRendered=false;
		if (!isHorizontalForm(component)) {
			span = startColSpanDiv(rw, menu, menu.getClientId(context), clientIdHasBeenRendered);
			if (null != span) {
				Tooltip.generateTooltip(context, menu, rw);
				clientIdHasBeenRendered=true;
			}
		}
		rw.startElement("div", menu);
		writeAttribute(rw, "dir", menu.getDir(), "dir");
		if (!clientIdHasBeenRendered) {
			writeAttribute(rw, "id", menu.getClientId(context));
			Tooltip.generateTooltip(context, menu, rw);
			clientIdHasBeenRendered=true;
		}

                rw.writeAttribute("class", getWithFeedback(getInputMode(menu.isInline()), component), "class");
                
		addLabel(rw, clientId + "Inner", menu);

		if (isHorizontalForm(component)) {
			span = startColSpanDiv(rw, menu, menu.getClientId(context), clientIdHasBeenRendered);
		}	
		UIComponent prependingAddOnFacet = menu.getFacet("prepend");
		UIComponent appendingAddOnFacet = menu.getFacet("append");
		final boolean hasAddon = startInputGroupForAddOn(rw, (prependingAddOnFacet != null),
				(appendingAddOnFacet != null), menu);

		addPrependingAddOnToInputGroup(context, rw, prependingAddOnFacet, (prependingAddOnFacet != null), menu);
		renderSelectTag(context, rw, clientId + "Inner", clientId, menu);
		addAppendingAddOnToInputGroup(context, rw, appendingAddOnFacet, (appendingAddOnFacet != null), menu);

		closeInputGroupForAddOn(rw, hasAddon);
		rw.endElement("div"); // form-group
		closeColSpanDiv(rw, span);
		Tooltip.activateTooltips(context, menu);

		String options = "";
		int maxHeight = menu.getMaxHeight();
		if (maxHeight > 0) {
			options += "," + "maxHeight:" + String.valueOf(maxHeight);
		}
		String nonSelectedText = menu.getNonSelectedText();
		if (nonSelectedText != null) {
			options += "," + "nonSelectedText:'" + nonSelectedText + "'";
		}
		String nSelectedText = menu.getNSelectedText();
		nSelectedText = (String) menu.getAttributes().get("nSelectedText"); // workaround
																			// -
																			// the
																			// regular
																			// getter
																			// always
																			// yields
																			// null
		if (nSelectedText != null) {
			options += "," + "nSelectedText:'" + nSelectedText + "'";
		}
		String allSelectedText = menu.getAllSelectedText();
		if (allSelectedText != null) {
			options += "," + "allSelectedText:'" + allSelectedText + "'";
		}
		int numberDisplayed = menu.getNumberDisplayed();
		if (numberDisplayed > 0) {
			options += "," + "numberDisplayed:" + String.valueOf(numberDisplayed);
		}

		if (menu.isIncludeSelectAllOption()) {
			options += "," + "includeSelectAllOption:" + "true";
		}

		String selectAllText = menu.getSelectAllText();
		if (selectAllText != null) {
			options += "," + "selectAllText:'" + selectAllText + "'";
		}

		if (menu.isEnableFiltering()) {
			options += "," + "enableFiltering:true";
		}

		String filterPlaceholder = menu.getFilterPlaceholder();
		if (filterPlaceholder != null) {
			options += "," + "filterPlaceholder:'" + filterPlaceholder + "'";
		}

		boolean enableCaseInsensitiveFiltering = menu.isEnableCaseInsensitiveFiltering();
		if (enableCaseInsensitiveFiltering) {
			options += "," + "enableCaseInsensitiveFiltering:" + "true";
		}

		boolean disableIfEmpty = menu.isDisableIfEmpty();
		if (disableIfEmpty) {
			options += "," + "disableIfEmpty:" + "true";
		}

		boolean dropRight = menu.isDropRight();
		if (dropRight) {
			options += "," + "dropRight:" + "true";
		}

		String buttonClass = menu.getButtonClass();
		if (buttonClass != null) {
			options += "," + "buttonClass:'" + buttonClass + "'";
		}

		String buttonContainer = menu.getButtonContainer();
		if (buttonContainer != null) {
			options += "," + "buttonContainer:'" + buttonClass + "'";
			if (menu.getStyleClass() != null)
				throw new FacesException(
						"b:selectMultiMenu can't process the styleClass attribute if the buttonContainer attribute is set.");
		} else {
			String styleClass = menu.getStyleClass();
			String blockStyle = "display:block";

			if (menu.isInline()) {
				blockStyle = "display:inline-block";
			} else {
				UIForm currentForm = AJAXRenderer.getSurroundingForm((UIComponent)component, true);
				if (null != currentForm && currentForm instanceof Form) {
					if (((Form) currentForm).isInline()) {
						blockStyle = "display:inline-block";
					}
				}
			}
			if (menu.getStyle()!=null) {
				blockStyle += ";" + menu.getStyle();
			}

			if (styleClass != null) {
				options += "," + "buttonContainer:'<div class=\"" + styleClass + "\"  style=\"" + blockStyle + "\"/>'";
			} else {
				options += "," + "buttonContainer:'<div class=\"btn-group\" style=\"" + blockStyle + "\" />'";
			}
		}

		int buttonWidth = menu.getButtonWidth();
		if (buttonWidth > 0) {
			options += "," + "buttonWidth:'" + buttonWidth + "px'";
		}
		
		for (String event: menu.getJQueryEvents().keySet()) {
			String optionalParameterList="event";
			if (menu.getJQueryEventParameterLists()!=null) {
				if (menu.getJQueryEventParameterLists().get(event) != null) {
					optionalParameterList = menu.getJQueryEventParameterLists().get(event);
				}
			}
			StringBuilder code = new StringBuilder();
			AJAXRenderer.generateAJAXCallForASingleEvent(context, menu,
					null, code, null, null, true, 
					event, null, optionalParameterList);
			if (code.length()>0) {
				String result = menu.getJQueryEvents().get(event);
				result += ":";
				String realCode = code.toString().replace(".callAjax(this", ".callAjax(document.getElementById('" + clientId + "Inner')" );
				if (!realCode.startsWith("function")) {
					result += "function(" + optionalParameterList + ")";
					result += "{";
					result += realCode;
					result += "}";
				} else {  // backward compatibility to BootsFaces 1.0.0 and earlier
					result += realCode;
				}
				options += "," + result;
			}
		}


		if (options.length() > 0) {
			options = "{" + options.substring(1, options.length()) + "}";
		}
		String js = "$(document).ready(function() {$('#" + clientId + "Inner').multiselect(" + options + ");});\n";
		context.getResponseWriter().write("<script type='text/javascript'>\r\n" + js + "\r\n</script>");
	}
758685
def show(self):
        
        off = 0
        for n, i in enumerate(self.get_instructions()):
            print("{:8d} (0x{:08x}) {:04x} {:30} {}".format(n, off, i.get_op_value(), i.get_name(), i.get_output(self.idx)))
            off += i.get_length()
59091
public void printStackTrace(java.io.PrintWriter s) {

        if (s == null) {
            s = new java.io.PrintWriter(System.err, true);
        }

        try {
            String locInfo = getLocationAsString();

            if (null != locInfo) {
                s.println(locInfo);
            }

            super.printStackTrace(s);
        } catch (Throwable e) {}

        boolean isJdk14OrHigher = false;
        try {
            Throwable.class.getMethod("getCause", (Class<?>) null);
            isJdk14OrHigher = true;
        } catch (NoSuchMethodException nsme) {
            // do nothing
        }        

        // The printStackTrace method of the Throwable class in jdk 1.4 
        // and higher will include the cause when printing the backtrace.
        // The following code is only required when using jdk 1.3 or lower                
        if (!isJdk14OrHigher) {
            Throwable exception = getException();
    
            for (int i = 0; (i < 10) && (null != exception); i++) {
                s.println("---------");
    
                try {
                    if (exception instanceof DTMException) {
                        String locInfo =
                            ((DTMException) exception)
                                .getLocationAsString();
    
                        if (null != locInfo) {
                            s.println(locInfo);
                        }
                    }
    
                    exception.printStackTrace(s);
                } catch (Throwable e) {
                    s.println("Could not print stack trace...");
                }
    
                try {
                    Method meth =
                        ((Object) exception).getClass().getMethod("getException",
                            (Class<?>) null);
    
                    if (null != meth) {
                        Throwable prev = exception;
    
                        exception = (Throwable) meth.invoke(exception, (Class<?>) null);
    
                        if (prev == exception) {
                            break;
                        }
                    } else {
                        exception = null;
                    }
                } catch (InvocationTargetException ite) {
                    exception = null;
                } catch (IllegalAccessException iae) {
                    exception = null;
                } catch (NoSuchMethodException nsme) {
                    exception = null;
                }
            }
        }
    }
790328
private void printEditedDetails() {
		StringBuilder buf = new StringBuilder();

		for (Object contact : repeater.getBeanList()) {
			buf.append(contact).append('\n');
		}

		console.setText(buf.toString());
	}
60420
def pretty_print(self):
        
        msg = "Source: " + str(self._source) + "\n"
        msg += "Destination: " + str(self._destination) + "\n"
        inv_types = {v: k for k, v in defines.Types.items()}
        msg += "Type: " + str(inv_types[self._type]) + "\n"
        msg += "MID: " + str(self._mid) + "\n"
        if self._code is None:
            self._code = 0

        msg += "Code: " + str(defines.Codes.LIST[self._code].name) + "\n"
        msg += "Token: " + str(self._token) + "\n"
        for opt in self._options:
            msg += str(opt)
        msg += "Payload: " + "\n"
        msg += str(self._payload) + "\n"
        return msg
114276
function printJSCode(isDupedVar, depth, value) {
    if (value == null || typeof value !== 'object') {
      return JSON.stringify(value);
    }
    // Only use variable references at depth beyond the top level.
    if (depth !== '') {
      const metadata = metadataForVal.get(value);
      if (metadata && metadata.isDuplicate) {
        if (!metadata.varName) {
          const refCode = printJSCode(true, '', value);
          metadata.varName = 'v' + varDefs.length;
          varDefs.push(metadata.varName + ' = ' + refCode);
        }
        return '(' + metadata.varName + '/*: any*/)';
      }
    }
    let str;
    let isEmpty = true;
    const depth2 = depth + '  ';
    if (Array.isArray(value)) {
      // Empty arrays can only have one inferred flow type and then conflict if
      // used in different places, this is unsound if we would write to them but
      // this whole module is based on the idea of a read only JSON tree.
      if (isDupedVar && value.length === 0) {
        return '([]/*: any*/)';
      }
      str = '[';
      for (let i = 0; i < value.length; i++) {
        str +=
          (isEmpty ? '\n' : ',\n') +
          depth2 +
          printJSCode(isDupedVar, depth2, value[i]);
        isEmpty = false;
      }
      str += isEmpty ? ']' : `\n${depth}]`;
    } else {
      str = '{';
      for (const k in value) {
        if (value.hasOwnProperty(k) && value[k] !== undefined) {
          str +=
            (isEmpty ? '\n' : ',\n') +
            depth2 +
            JSON.stringify(k) +
            ': ' +
            printJSCode(isDupedVar, depth2, value[k]);
          isEmpty = false;
        }
      }
      str += isEmpty ? '}' : `\n${depth}}`;
    }
    return str;
  }