code: def check_variables(variables, variable_groups, explainer):
      if variable_groups is None:
          # if `variables` are not specified, then extract from data
          if variables is None:
              variables = list(explainer.data.columns)
          elif not isinstance(variables, (list, np.ndarray)):
              raise TypeError(
                  "variables must be list or numpy.ndarray or a dict"
              )
      else:
          if variables is not None:
              warn(
                  "Variables parameter ignored, taken variable_groups instead."
              )
          variables = variable_groups
  
      if not isinstance(variables, (list, np.ndarray, dict)):
          raise TypeError(
              "variables must be list or numpy.ndarray or a dict"
          )
  
      if isinstance(variables, (list, np.ndarray)):
          result = {}
          for var in variables:
              result[var] = var
  
          variables = result
  
      return variables
  
file_path: DALEX/python/dalex/dalex/model_explanations/_variable_importance/checks.py
imports: from warnings import warn
  from .._model_performance.utils import *
  from .._variable_importance.loss_functions import *
label_desc: Use image node_id 4 for calling a global function with example usage: check_variables(variables, variable_groups, explainer) and returns: variables