code: def check_y(y):
      if y is not None and isinstance(y, pd.Series):
          y = np.array(y)
      elif y is not None and not isinstance(y, np.ndarray):
          raise TypeError("y must be numpy.ndarray or pandas.Series")
  
      return y
  
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 4 for calling a global function with example usage: check_y(y) and returns: y