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","."]
docstr: Output cache is full, cull the oldest entries
docstr_tok: ["Output","cache","is","full",",","cull","the","oldest","entries"]
code: def cull_cache(self):
      """Output cache is full, cull the oldest entries"""
      oh = self.shell.user_ns.get("_oh", {})
      sz = len(oh)
      cull_count = max(int(sz * self.cull_fraction), 2)
      warn(
          "Output cache limit (currently {sz} entries) hit.\n"
          "Flushing oldest {cull_count} entries.".format(
              sz=sz, cull_count=cull_count
          )
      )
  
      for i, n in enumerate(sorted(oh)):
          if i >= cull_count:
              break
          self.shell.user_ns.pop("_%i" % n, None)
          oh.pop(n, None)
  
imports: from __future__ import print_function
  import sys
  import io
  import tokenize
  from traitlets.config.configurable import Configurable
  from IPython.utils.py3compat import builtin_mod, cast_unicode_py2
  from traitlets import Instance, Float
  from warnings import warn
label_desc: Use image node_id 14 for calling the DisplayHook obj's underlying member method code with example usage: obj.cull_cache() without return types