code: def _instantiate_step(step):
      if not isinstance(step, Mapping):
          raise TypeError(
              "step must be a mapping, got {}".format(
                  type(step).__name__
              )
          )
  
      kind = step.pop("kind", None)
  
      if kind not in _mapping:
          raise ValueError(
              "Each step must have a kind key with one of "
              "the valid values: {}".format(set(_mapping))
          )
  
      return _mapping[kind](**step)
  
imports: from copy import copy, deepcopy
  import abc
  import inspect
  import importlib
  import itertools
  from collections.abc import Mapping
  import pandas
  from decorator import decorator
  from sklearn_evaluation.exceptions import DataSelectorError
  from sklearn_evaluation.util import map_parameters_in_fn_call
  from sklearn_evaluation.table import Table
label_desc: Use image node_id 11 for calling a global function with example usage: _instantiate_step(step) and returns: _mapping