code: def eval_trailer(context, base_contexts, trailer):
      trailer_op, node = trailer.children[:2]
      if node == ")":  # `arglist` is optional.
          node = None
  
      if trailer_op == "[":
          trailer_op, node, _ = trailer.children
  
          # TODO It's kind of stupid to cast this from a context set to a set.
          foo = set(base_contexts)
          # special case: PEP0484 typing module, see
          # https://github.com/davidhalter/jedi/issues/663
          result = ContextSet()
          for typ in list(foo):
              if isinstance(typ, (ClassContext, TreeInstance)):
                  typing_module_types = pep0484.py__getitem__(
                      context, typ, node
                  )
                  if typing_module_types is not None:
                      foo.remove(typ)
                      result |= typing_module_types
  
          return result | base_contexts.get_item(
              eval_subscript_list(context.evaluator, context, node),
              ContextualizedNode(context, trailer),
          )
      else:
          debug.dbg("eval_trailer: %s in %s", trailer, base_contexts)
          if trailer_op == ".":
              return base_contexts.py__getattribute__(
                  name_context=context, name_or_str=node
              )
          else:
              assert trailer_op == "(", (
                  "trailer_op is actually %s" % trailer_op
              )
              args = arguments.TreeArguments(
                  context.evaluator, context, node, trailer
              )
              return base_contexts.execute(args)
  
imports: import copy
  from parso.python import tree
  from jedi._compatibility import force_unicode, unicode
  from jedi import debug
  from jedi import parser_utils
  from jedi.evaluate.base_context import ContextSet, NO_CONTEXTS, ContextualizedNode, ContextualizedName, iterator_to_context_set, iterate_contexts
  from jedi.evaluate import compiled
  from jedi.evaluate import pep0484
  from jedi.evaluate import recursion
  from jedi.evaluate import helpers
  from jedi.evaluate import analysis
  from jedi.evaluate import imports
  from jedi.evaluate import arguments
  from jedi.evaluate.pep0484 import _evaluate_for_annotation
  from jedi.evaluate.context import ClassContext, FunctionContext
  from jedi.evaluate.context import iterable
  from jedi.evaluate.context import TreeInstance, CompiledInstance
  from jedi.evaluate.finder import NameFinder
  from jedi.evaluate.helpers import is_string, is_literal, is_number, is_compiled
  from jedi.evaluate.compiled.access import COMPARISON_OPERATORS
label_desc: Use image node_id 4 for calling a global function with example usage: eval_trailer(context, base_contexts, trailer) and returns: unknown, base_contexts, base_contexts