code: def eval_factor(context_set, operator):
      """
      Calculates `+`, `-`, `~` and `not` prefixes.
      """
      for context in context_set:
          if operator == "-":
              if is_number(context):
                  yield context.negate()
          elif operator == "not":
              value = context.py__bool__()
              if value is None:  # Uncertainty.
                  return
              yield compiled.create_simple_object(
                  context.evaluator, not value
              )
          else:
              yield context
  
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 9 for calling a global function with example usage: eval_factor(context_set, operator) without return types