code: def check_variables(variables, explainer, variable_splits):
      if isinstance(variables, str):
          variables = [variables]
      variables_ = deepcopy(variables)
      if variable_splits is not None:
          variables_ = variable_splits.keys()
          warnings.warn("Variables taken from variables_splits")
      elif variables_ is not None and isinstance(
          variables_, (list, np.ndarray, pd.Series)
      ):
          if not set(variables_).issubset(explainer.data.columns):
              raise ValueError("Invalid variable names")
      elif variables_ is not None and not isinstance(
          variables_, (list, np.ndarray, pd.Series)
      ):
          raise TypeError(
              "variables must be None or str or list or np.ndarray or pd.Series"
          )
      else:
          variables_ = explainer.data.columns
  
      return list(variables_)
  
file_path: DALEX/python/dalex/dalex/predict_explanations/_ceteris_paribus/checks.py
imports: import warnings
  from copy import deepcopy
  import numpy
  import pandas
  from .None import utils
label_desc: Use image node_id 1 for calling a global function with example usage: check_variables(variables, explainer, variable_splits) and returns: list