code: def validate_inputs(self, X, y):
      # Things we don't want to allow until we've tested them:
      # - Sparse inputs
      # - Multiclass outputs (e.g., more than 2 classes in `y`)
      # - Non-finite inputs
      # - Complex inputs
  
      X, y = check_X_y(X, y, accept_sparse=False, allow_nd=False)
  
      # Throw a ValueError if X or y contains NaN or infinity.
      assert_all_finite(X)
      assert_all_finite(y)
  
      if type_of_target(y) != "binary":
          raise ValueError("Non-binary targets not supported")
  
      if np.any(np.iscomplex(X)) or np.any(np.iscomplex(y)):
          raise ValueError("Complex data not supported")
      if np.issubdtype(X.dtype, np.object_) or np.issubdtype(
          y.dtype, np.object_
      ):
          try:
              X = X.astype(float)
              y = y.astype(int)
          except (TypeError, ValueError):
              raise ValueError("argument must be a string.* number")
  
      return (X, y)
  
imports: from abc import abstractmethod
  import numpy
  from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.utils.validation import check_X_y, assert_all_finite, check_array, check_is_fitted
  from sklearn.utils.multiclass import type_of_target
label_desc: Use image node_id 3 for calling the PytorchClassifier obj's underlying member method code with example usage: obj.validate_inputs(X, y) and returns: X,  y