code: def check_input(X):
      """
      Raise a clear error if X is a pandas dataframe
      and check array according to scikit rules
      """
      if isinstance(X, (pd.DataFrame, pd.Series)):
          err_message = "Pandas DataFrame are not supported: apply X.values when calling fit"
          raise TypeError(err_message)
      check_array(X, accept_sparse=True)
  
imports: from torch.utils.data import Dataset
  from torch.utils.data import DataLoader, WeightedRandomSampler
  import torch
  import numpy
  import scipy
  import json
  from sklearn.utils import check_array
  import pandas
  import warnings
label_desc: Use image node_id 9 for calling a global function with example usage: check_input(X) without return types