code: def evaluate_goto_definition(evaluator, context, leaf):
      if leaf.type == "name":
          # In case of a name we can just use goto_definition which does all the
          # magic itself.
          return evaluator.goto_definitions(context, leaf)
  
      parent = leaf.parent
      if parent.type == "atom":
          return context.eval_node(leaf.parent)
      elif parent.type == "trailer":
          return evaluate_call_of_leaf(context, leaf)
      elif isinstance(leaf, tree.Literal):
          return eval_atom(context, leaf)
      elif leaf.type in (
          "fstring_string",
          "fstring_start",
          "fstring_end",
      ):
          return get_string_context_set(evaluator)
      return []
  
imports: import re
  from collections import namedtuple
  from textwrap import dedent
  from parso.python.parser import Parser
  from parso.python import tree
  from jedi._compatibility import u
  from jedi.evaluate.syntax_tree import eval_atom
  from jedi.evaluate.helpers import evaluate_call_of_leaf
  from jedi.evaluate.compiled import get_string_context_set
  from jedi.cache import call_signature_time_cache
label_desc: Use image node_id 6 for calling a global function with example usage: evaluate_goto_definition(evaluator, context, leaf) and returns: list, evaluator, context, evaluate_call_of_leaf, eval_atom, get_string_context_set