docstr: Returns selected features from X.
  
  Paramters
  ---------
  X: array-like
      Shape = [n_samples, n_features]
      The training input samples.
docstr_tok: ["Returns","selected","features","from","X.","Paramters","--","--","--","--","-","X",":","array-like","Shape","=","[","n_samples",",","n_features","]","The","training","input","samples","."]
code: def transform(self, X):
      """
      Returns selected features from X.
  
      Paramters
      ---------
      X: array-like
          Shape = [n_samples, n_features]
          The training input samples.
      """
  
      self._get_support_mask()
      if self.selected_features_.shape[0] == 0:
          raise ValueError(
              "No Features selected, consider lowering the penalty or specifying n_features"
          )
      return (
          X.iloc[:, self.selected_features_]
          if isinstance(X, pd.DataFrame)
          else X[:, self.selected_features_]
      )
  
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 11 for calling the FeatureGradientSelector obj's underlying member method code with example usage: obj.transform(X) and returns: unknown