class_docstr: Represents an immutable set of features to be calculated for a single dataframe, and their
  dependencies.
class_docstr_tok: ["Represents","an","immutable","set","of","features","to","be","calculated","for","a","single","dataframe",",","and","their","dependencies","."]
docstr: Topologically sort the given features, then group by path,
  feature type, use_previous, and where.
docstr_tok: ["Topologically","sort","the","given","features",",","then","group","by","path",",","feature","type",",","use_previous",",","and","where","."]
code: def group_features(self, feature_names):
      """
      Topologically sort the given features, then group by path,
      feature type, use_previous, and where.
      """
      features = [self.features_by_name[name] for name in feature_names]
      depths = self._get_feature_depths(features)
  
      def key_func(f):
          return (
              depths[f.unique_name()],
              f.relationship_path_name(),
              str(f.__class__),
              _get_use_previous(f),
              _get_where(f),
              self.uses_full_dataframe(f),
              _get_groupby(f),
          )
  
      # Sort the list of features by the complex key function above, then
      # group them by the same key
      sort_feats = sorted(features, key=key_func)
      feature_groups = [
          list(g)
          for _, g in itertools.groupby(sort_feats, key=key_func)
      ]
  
      return feature_groups
  
file_path: featuretools/featuretools/computational_backends/feature_set.py
imports: import itertools
  import logging
  from collections import defaultdict
  from featuretools.entityset.relationship import RelationshipPath
  from featuretools.feature_base import AggregationFeature, FeatureOutputSlice, GroupByTransformFeature, TransformFeature
  from featuretools.utils import Trie
label_desc: Use image node_id 5 for calling the FeatureSet obj's underlying member method code with example usage: obj.group_features(feature_names) and returns: feature_groups, depths,  f,  str,  _get_use_previous,  _get_where,  self,  _get_groupby