class_docstr: Helper class that wraps values of certain types and produces a custom
  __repr__() that may be elided and is suitable for use during pretty
  printing
class_docstr_tok: ["Helper","class","that","wraps","values","of","certain","types","and","produces","a","custom","__repr__","(",")","that","may","be","elided","and","is","suitable","for","use","during","pretty","printing"]
code: def __repr__(self):
      numpy = get_module("numpy")
      if isinstance(self.v, (list, tuple)):
          # Handle lists/tuples
          res = _list_repr_elided(
              self.v, threshold=self.threshold, indent=self.indent
          )
          return res
      elif numpy and isinstance(self.v, numpy.ndarray):
          # Handle numpy arrays
  
          # Get original print opts
          orig_opts = numpy.get_printoptions()
  
          # Set threshold to self.max_list_elements
          numpy.set_printoptions(
              **dict(
                  orig_opts,
                  threshold=self.threshold,
                  edgeitems=3,
                  linewidth=80,
              )
          )
  
          res = self.v.__repr__()
  
          # Add indent to all but the first line
          res_lines = res.split("\n")
          res = ("\n" + " " * self.indent).join(res_lines)
  
          # Restore print opts
          numpy.set_printoptions(**orig_opts)
          return res
      elif isinstance(self.v, str):
          # Handle strings
          if len(self.v) > 80:
              return (
                  "("
                  + repr(self.v[:30])
                  + " ... "
                  + repr(self.v[-30:])
                  + ")"
              )
          else:
              return self.v.__repr__()
      else:
          return self.v.__repr__()
  
file_path: catboost/contrib/python/plotly/py3/plotly/utils.py
imports: import textwrap
  from pprint import PrettyPrinter
  from _plotly_utils.utils import *
  from _plotly_utils.data_utils import *
label_desc: Use image node_id 3 for calling the ElidedWrapper obj's underlying member method code with example usage: obj.__repr__() and returns: res, res, self, unknown, self