docstr: Returns a PrepareData object.
docstr_tok: ["Returns","a","PrepareData","object","."]
code: def _prepare_data(self, X, y, n_classes=None):
      """
      Returns a PrepareData object.
      """
      return PrepareData(
          X=X.values if isinstance(X, pd.DataFrame) else X,
          y=y.values if isinstance(y, pd.Series) else y,
          data_format=constants.DataFormat.NUMPY,
          classification=int(self.classification),
          ordinal=self.ordinal,
          balanced=self.balanced,
          preprocess=self.preprocess,
          verbose=self.verbose,
          device=self.device,
          n_classes=n_classes,
      )
  
imports: import time
  import numpy
  import pandas
  from sklearn.base import BaseEstimator
  from sklearn.feature_selection import SelectorMixin
  from sklearn.utils.validation import check_is_fitted
  import torch
  from nni.feature_engineering.feature_selector import FeatureSelector
  from .None import constants
  from .fginitialize import PrepareData
  from .fgtrain import _train
label_desc: Use image node_id 6 for calling the FeatureGradientSelector obj's underlying member method code with example usage: obj._prepare_data(X, y, n_classes) and returns: PrepareData