code: def search_params(evaluator, execution_context, funcdef):
      """
      A dynamic search for param values. If you try to complete a type:
  
      >>> def func(foo):
      ...     foo
      >>> func(1)
      >>> func("")
  
      It is not known what the type ``foo`` without analysing the whole code. You
      have to look for all calls to ``func`` to find out what ``foo`` possibly
      is.
      """
      if not settings.dynamic_params:
          return create_default_params(execution_context, funcdef)
  
      evaluator.dynamic_params_depth += 1
      try:
          path = execution_context.get_root_context().py__file__()
          if path is not None and is_stdlib_path(path):
              # We don't want to search for usages in the stdlib. Usually people
              # don't work with it (except if you are a core maintainer, sorry).
              # This makes everything slower. Just disable it and run the tests,
              # you will see the slowdown, especially in 3.6.
              return create_default_params(execution_context, funcdef)
  
          if funcdef.type == "lambdef":
              string_name = _get_lambda_name(funcdef)
              if string_name is None:
                  return create_default_params(
                      execution_context, funcdef
                  )
          else:
              string_name = funcdef.name.value
          debug.dbg(
              "Dynamic param search in %s.",
              string_name,
              color="MAGENTA",
          )
  
          try:
              module_context = execution_context.get_root_context()
              function_executions = _search_function_executions(
                  evaluator,
                  module_context,
                  funcdef,
                  string_name=string_name,
              )
              if function_executions:
                  zipped_params = zip(
                      *list(
                          function_execution.get_executed_params()
                          for function_execution in function_executions
                      )
                  )
                  params = [
                      DynamicExecutedParams(evaluator, executed_params)
                      for executed_params in zipped_params
                  ]
                  # Evaluate the ExecutedParams to types.
              else:
                  return create_default_params(
                      execution_context, funcdef
                  )
          finally:
              debug.dbg(
                  "Dynamic param result finished", color="MAGENTA"
              )
          return params
      finally:
          evaluator.dynamic_params_depth -= 1
  
imports: from parso.python import tree
  from jedi import settings
  from jedi import debug
  from jedi.evaluate.cache import evaluator_function_cache
  from jedi.evaluate import imports
  from jedi.evaluate.arguments import TreeArguments
  from jedi.evaluate.param import create_default_params
  from jedi.evaluate.helpers import is_stdlib_path
  from jedi.evaluate.utils import to_list
  from jedi.parser_utils import get_parent_scope
  from jedi.evaluate.context import ModuleContext, instance
  from jedi.evaluate.base_context import ContextSet, NO_CONTEXTS
  from jedi.evaluate import recursion
label_desc: Use image node_id 1 for calling a global function with example usage: search_params(evaluator, execution_context, funcdef) and returns: create_default_params, params, create_default_params, create_default_params, create_default_params