code: def check_data(data, model, verbose):
      if data is None:
          verbose_cat(
              "  -> data              : Not specified!", verbose=verbose
          )
      else:
          if isinstance(data, np.ndarray):
              verbose_cat(
                  "  -> data              : numpy.ndarray converted to pandas.DataFrame. Columns are set as string numbers.",
                  verbose=verbose,
              )
              data = pd.DataFrame(data)
              data.columns = data.columns.astype(str)
          elif type(data).__name__ == "H2OFrame":  # can't import h2o
              verbose_cat(
                  "  -> data              : h2o.H2OFrame converted to pandas.DataFrame. Column types are saved in the model.",
                  verbose=verbose,
              )
              model._column_types = (
                  data.types
              )  # pandas attribute 'attrs' is experimental and may break in future versions
              data = data.as_data_frame()
          elif not isinstance(data, pd.DataFrame):
              raise TypeError(
                  "'data' must be pandas.DataFrame or numpy.ndarray"
              )
  
          if data.index.unique().shape[0] != data.shape[0]:
              raise ValueError("'data' index is not unique")
  
          verbose_cat(
              "  -> data              : "
              + str(data.shape[0])
              + " rows "
              + str(data.shape[1])
              + " cols",
              verbose=verbose,
          )
  
      return data, model
  
imports: import numpy
  import pandas
  from copy import deepcopy
  from warnings import warn
  from .helper import verbose_cat, is_y_in_data, get_model_info
  from .yhat import get_predict_function_and_model_type
label_desc: Use image node_id 1 for calling a global function with example usage: check_data(data, model, verbose) and returns: data,  model