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: Parse Python expression and detects whether last token is ';'
docstr_tok: ["Parse","Python","expression","and","detects","whether","last","token","is","'",";","'"]
code: def semicolon_at_end_of_expression(expression):
      """Parse Python expression and detects whether last token is ';'"""
  
      sio = _io.StringIO(expression)
      tokens = list(tokenize.generate_tokens(sio.readline))
  
      for token in reversed(tokens):
          if token[0] in (
              tokenize.ENDMARKER,
              tokenize.NL,
              tokenize.NEWLINE,
              tokenize.COMMENT,
          ):
              continue
          if (token[0] == tokenize.OP) and (token[1] == ";"):
              return True
          else:
              return False
  
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 5 for calling the DisplayHook obj's underlying member method code with example usage: obj.semicolon_at_end_of_expression(expression) and returns: True, False