code: def pretty(arg, linewidth=75, threshold=1000):
      """
      Pretty print an expression. This is useful for debugging.
  
      :param int linewidth: Maximum linewidth before summarization.
      :param int threshold: Total number of array elements which trigger
          summarization rather than full repr (default 1000). To always use the full
          repr without summarization, pass sys.maxsize
      :returns: A pretty string.
      :rtype: str
      """
      out = []
      try:
          old = quote.printoptions.copy()
          quote.printoptions["threshold"] = threshold
          _quote_inplace(arg, 0, out)
      finally:
          quote.printoptions.update(old)
      fill = "   \u2502" * 100
      lines = []
      for indent, line in out:
          if len(line) > linewidth:
              line = line[: linewidth - 3] + "..."
          lines.append(fill[:indent] + line)
      return "\n".join(lines)
  
imports: import functools
  import inspect
  import pprint
  import re
  import sys
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: pretty(arg, linewidth, threshold) and returns: str