code: def _dictionarize(names):
      return dict(
          (n if n.tree_name is None else n.tree_name, n) for n in names
      )
  
imports: from jedi.evaluate import imports
  from jedi.evaluate.filters import TreeNameDefinition
  from jedi.evaluate.context import ModuleContext
label_desc: Use image node_id 2 for calling a global function with example usage: _dictionarize(names) and returns: dict