code: def _check_isinstance_type(context, element, search_name):
      try:
          assert element.type in ("power", "atom_expr")
          # this might be removed if we analyze and, etc
          assert len(element.children) == 2
          first, trailer = element.children
          assert first.type == "name" and first.value == "isinstance"
          assert (
              trailer.type == "trailer" and trailer.children[0] == "("
          )
          assert len(trailer.children) == 3
  
          # arglist stuff
          arglist = trailer.children[1]
          args = TreeArguments(
              context.evaluator, context, arglist, trailer
          )
          param_list = list(args.unpack())
          # Disallow keyword arguments
          assert len(param_list) == 2
          (key1, lazy_context_object), (
              key2,
              lazy_context_cls,
          ) = param_list
          assert key1 is None and key2 is None
          call = helpers.call_of_leaf(search_name)
          is_instance_call = helpers.call_of_leaf(
              lazy_context_object.data
          )
          # Do a simple get_code comparison. They should just have the same code,
          # and everything will be all right.
          normalize = context.evaluator.grammar._normalize
          assert normalize(is_instance_call) == normalize(call)
      except AssertionError:
          return None
  
      context_set = ContextSet()
      for cls_or_tup in lazy_context_cls.infer():
          if (
              isinstance(cls_or_tup, iterable.Sequence)
              and cls_or_tup.array_type == "tuple"
          ):
              for lazy_context in cls_or_tup.py__iter__():
                  for context in lazy_context.infer():
                      context_set |= context.execute_evaluated()
          else:
              context_set |= cls_or_tup.execute_evaluated()
      return context_set
  
imports: from parso.python import tree
  from parso.tree import search_ancestor
  from jedi import debug
  from jedi import settings
  from jedi.evaluate.context import AbstractInstanceContext
  from jedi.evaluate import compiled
  from jedi.evaluate import analysis
  from jedi.evaluate import flow_analysis
  from jedi.evaluate.arguments import TreeArguments
  from jedi.evaluate import helpers
  from jedi.evaluate.context import iterable
  from jedi.evaluate.filters import get_global_filters, TreeNameDefinition
  from jedi.evaluate.base_context import ContextSet
  from jedi.parser_utils import is_scope, get_parent_scope
label_desc: Use image node_id 2 for calling a global function with example usage: _check_isinstance_type(context, element, search_name) and returns: context_set, None