code: def displayhook(value):
      
      global _displayhooks
      new_hooks = []
  
      for hook_ref in _displayhooks:
          hook = hook_ref()
          if hook:
              hook(value)
              new_hooks.append(hook_ref)
  
      _displayhooks = new_hooks
  
      sys.__displayhook__(value)
docs: Runs all of the registered display hook methods with the given value.
      Look at the sys.displayhook documentation for more information.
      
      :param      value | <variant>