code: def register_pprint(cls):
      if hasattr(cls, "__repr__"):
          # This depends on internals of the pprint.PrettyPrinter class.
          pprint.PrettyPrinter._dispatch[cls.__repr__] = _pprint_funsor
  
imports: import functools
  import inspect
  import pprint
  import re
  import sys
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: register_pprint(cls) without return types