class_docstr: Base class for sampling algorithms.
  
  Warning: This class should not be used directly. Use the derive classes
  instead.
code: def _check_X_y(self, X, y, accept_sparse: Optional[List[str]] = None):
      if accept_sparse is None:
          accept_sparse = ["csr", "csc"]
      y, binarize_y = check_target_type(y, indicate_one_vs_all=True)
      X, y = self._validate_data(
          X, y, reset=True, accept_sparse=accept_sparse
      )
      return X, y, binarize_y
  
imports: from abc import ABCMeta, abstractmethod
  from typing import List, Optional
  import numpy
  from sklearn.base import BaseEstimator
  from sklearn.preprocessing import label_binarize
  from sklearn.utils.multiclass import check_classification_targets
  from .utils import check_sampling_strategy, check_target_type
  from .utils import ArraysTransformer
label_desc: Use image node_id 2 for calling the BaseSampler obj's underlying member method code with example usage: obj._check_X_y(X, y, accept_sparse) and returns: X,  y,  binarize_y