code: def _format(self, object, stream, indent, allowance, context, level):
      objid = id(object)
      if objid in context:
          stream.write(_recursion(object))
          self._recursive = True
          self._readable = False
          return
      rep = self._repr(object, context, level)
      max_width = self._width - indent - allowance
      if len(rep) > max_width:
          p = self._dispatch.get(type(object).__repr__, None)
          if p is not None:
              context[objid] = 1
              p(
                  self,
                  object,
                  stream,
                  indent,
                  allowance,
                  context,
                  level + 1,
              )
              del context[objid]
              return
          elif (
              _dataclasses.is_dataclass(object)
              and not isinstance(object, type)
              and object.__dataclass_params__.repr
              and
              # Check dataclass has generated repr method.
              hasattr(object.__repr__, "__wrapped__")
              and "__create_fn__"
              in object.__repr__.__wrapped__.__qualname__
          ):
              context[objid] = 1
              self._pprint_dataclass(
                  object, stream, indent, allowance, context, level + 1
              )
              del context[objid]
              return
      stream.write(rep)
  
imports: import collections
  import dataclasses
  import re
  import sys
  import types
  from io import StringIO
label_desc: Use image node_id 6 for calling the PrettyPrinter obj's underlying member method code with example usage: obj._format(object, stream, indent, allowance, context, level) without return types