code: def split_data(data, indices):
      if isinstance(data, np.ndarray):
          return data[indices]
      elif pd is not None and isinstance(data, pd.DataFrame):
          return data.iloc[indices]
      else:
          raise TypeError(
              "Expected the data to be numpy.ndarray or pandas.DataFrame. "
              f"Received: {data}."
          )
  
file_path: keras-tuner/keras_tuner/tuners/sklearn_tuner.py
imports: import collections
  import inspect
  import os
  import pickle
  import numpy
  from keras_tuner import backend
  from keras_tuner.api_export import keras_tuner_export
  from keras_tuner.engine import base_tuner
label_desc: Use image node_id 1 for calling a global function with example usage: split_data(data, indices) and returns: data, data