code: def get_entity(expression):
      """Return the object corresponding to expression evaluated
      in a namespace spanning sys.modules and __main.dict__.
      """
      if expression:
          namespace = {**sys.modules, **__main__.__dict__}
          try:
              return eval(
                  expression, namespace
              )  # Only protect user code.
          except BaseException:
              # An uncaught exception closes idle, and eval can raise any
              # exception, especially if user classes are involved.
              return None
  
file_path: cpython/Lib/idlelib/calltip.py
imports: import __main__
  import inspect
  import re
  import sys
  import textwrap
  import types
  from idlelib import calltip_w
  from idlelib.hyperparser import HyperParser
label_desc: Use image node_id 1 for calling a global function with example usage: get_entity(expression) and returns: eval, None