code: def builtins_next(evaluator, iterators, defaults):
      """
      TODO this function is currently not used. It's a stab at implementing next
      in a different way than fake objects. This would be a bit more flexible.
      """
      if evaluator.environment.version_info.major == 2:
          name = "next"
      else:
          name = "__next__"
  
      context_set = NO_CONTEXTS
      for iterator in iterators:
          if isinstance(iterator, AbstractInstanceContext):
              context_set = ContextSet.from_sets(
                  n.infer()
                  for filter in iterator.get_filters(
                      include_self_names=True
                  )
                  for n in filter.get(name)
              ).execute_evaluated()
      if context_set:
          return context_set
      return defaults
  
imports: import parso
  from jedi._compatibility import force_unicode
  from jedi import debug
  from jedi.evaluate.arguments import ValuesArguments, repack_with_argument_clinic
  from jedi.evaluate import analysis
  from jedi.evaluate import compiled
  from jedi.evaluate.context.instance import AbstractInstanceContext, CompiledInstance, BoundMethod, InstanceArguments
  from jedi.evaluate.base_context import ContextualizedNode, NO_CONTEXTS, ContextSet
  from jedi.evaluate.context import ClassContext, ModuleContext, FunctionExecutionContext
  from jedi.evaluate.context import iterable
  from jedi.evaluate.lazy_context import LazyTreeContext
  from jedi.evaluate.syntax_tree import is_string
label_desc: Use image node_id 4 for calling a global function with example usage: builtins_next(evaluator, iterators, defaults) and returns: defaults, context_set