code: def _default_repr_pretty(obj: Union[TensorVariable, Model], p, cycle):
      """Handy plug-in method to instruct IPython-like REPLs to use our str_repr above."""
      # we know that our str_repr does not recurse, so we can ignore cycle
      try:
          output = obj.str_repr()
          # Find newlines and replace them with p.break_()
          # (see IPython.lib.pretty._repr_pprint)
          lines = output.splitlines()
          with p.group():
              for idx, output_line in enumerate(lines):
                  if idx:
                      p.break_()
                  p.text(output_line)
      except AttributeError:
          # the default fallback option (no str_repr method)
          IPython.lib.pretty._repr_pprint(obj, p, cycle)
  
file_path: pymc/pymc/printing.py
imports: from typing import Union
  from pytensor.compile import SharedVariable
  from pytensor.graph.basic import Constant, walk
  from pytensor.tensor.basic import TensorVariable, Variable
  from pytensor.tensor.elemwise import DimShuffle
  from pytensor.tensor.random.basic import RandomVariable
  from pytensor.tensor.random.var import RandomGeneratorSharedVariable, RandomStateSharedVariable
  from pymc.model import Model
label_desc: Use image node_id 10 for calling a global function with example usage: _default_repr_pretty(obj, p, cycle) without return types