class_docstr: The custom IPython displayhook to replace sys.displayhook.
  
  This class does many things, but the basic idea is that it is a callable
  that gets called anytime user code returns a value.
class_docstr_tok: ["The","custom","IPython","displayhook","to","replace","sys.displayhook",".","This","class","does","many","things",",","but","the","basic","idea","is","that","it","is","a","callable","that","gets","called","anytime","user","code","returns","a","value","."]
code: def flush(self):
      if not self.do_full_cache:
          raise ValueError(
              "You shouldn't have reached the cache flush "
              "if full caching is not enabled!"
          )
      # delete auto-generated vars from global namespace
  
      for n in range(1, self.prompt_count + 1):
          key = "_" + repr(n)
          try:
              del self.shell.user_ns_hidden[key]
          except KeyError:
              pass
          try:
              del self.shell.user_ns[key]
          except KeyError:
              pass
      # In some embedded circumstances, the user_ns doesn't have the
      # '_oh' key set up.
      oh = self.shell.user_ns.get("_oh", None)
      if oh is not None:
          oh.clear()
  
      # Release our own references to objects:
      self._, self.__, self.___ = "", "", ""
  
      if "_" not in builtin_mod.__dict__:
          self.shell.user_ns.update(
              {"_": self._, "__": self.__, "___": self.___}
          )
      import gc
  
      # TODO: Is this really needed?
      # IronPython blocks here forever
      if sys.platform != "cli":
          gc.collect()
  
imports: import builtins
  import sys
  import io
  import tokenize
  from traitlets.config.configurable import Configurable
  from traitlets import Instance, Float
  from warnings import warn
label_desc: Use image node_id 16 for calling the DisplayHook obj's underlying member method code with example usage: obj.flush() without return types