docstr: Set the selected features after a run.
  
  With groups, ensures that if any member of a group is selected, all members are selected
docstr_tok: ["Set","the","selected","features","after","a","run",".","With","groups",",","ensures","that","if","any","member","of","a","group","is","selected",",","all","members","are","selected"]
code: def _set_top_features(self, groups=None):
      """
      Set the selected features after a run.
  
      With groups, ensures that if any member of a group is selected, all members are selected
      """
      self._get_support_mask()
      assert (
          self.n_features <= self.scores_.shape[0]
      ), "n_features must be less than or equal to the number of columns in X"
      # pylint: disable=E1130
      self.selected_features_ = np.argpartition(
          self.scores_, -self.n_features
      )[-self.n_features :]
      if groups is not None and not self.soft_grouping:
          selected_feature_set = set(self.selected_features_.tolist())
          for _ in np.unique(groups):
              group_members = np.where(groups == groups)[0].tolist()
              if selected_feature_set.intersection(group_members):
                  selected_feature_set.update(group_members)
          self.selected_features_ = np.array(list(selected_feature_set))
      self.selected_features_ = np.sort(self.selected_features_)
      return self
  
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 20 for calling the FeatureGradientSelector obj's underlying member method code with example usage: obj._set_top_features(groups) and returns: self