class_docstr: Feature metadata contains information about features that are not directly apparent in the raw data itself.
  This enables feature generators to properly process features, and allows downstream models to properly handle features during training and inference.
  
  Parameters
  ----------
  type_map_raw : Dict[str, str]
      Dictionary of feature names to raw types.
      The values can be anything, but it is generally recommended they be one of:
          ['int', 'float', 'object', 'category', 'datetime']
  type_group_map_special : Dict[str, List[str]], optional
      Dictionary of special types to lists of feature names.
      The keys can be anything, but it is generally recommended they be one of:
          ['binned', 'datetime_as_int', 'datetime_as_object', 'text', 'text_as_category', 'text_special', 'text_ngram', 'image_path', 'stack']
      For descriptions of each special feature-type, see: `autogluon.common.features.types`
      Feature names that appear in the value lists must also be keys in type_map_raw.
      Feature names are not required to have special types.
      Only one of type_group_map_special and type_map_special can be specified.
  type_map_special : Dict[str, List[str]], optional
      Dictionary of feature names to lists of special types.
      This is an alternative representation of the special types.
      Only one of type_group_map_special and type_map_special can be specified.
docstr: Returns a list of features held within the feature metadata object after being pruned through the available parameters.
  
  Parameters
  ----------
  valid_raw_types : list, default None
      If a feature's raw type is not in this list, it is pruned.
      If None, then no features are pruned through this logic.
  valid_special_types : list, default None
      If a feature has a special type not in this list, it is pruned.
      Features without special types are never pruned through this logic.
      If None, then no features are pruned through this logic.
  invalid_raw_types : list, default None
      If a feature's raw type is in this list, it is pruned.
      If None, then no features are pruned through this logic.
  invalid_special_types : list, default None
      If a feature has a special type in this list, it is pruned.
      Features without special types are never pruned through this logic.
      If None, then no features are pruned through this logic.
  required_special_types : list, default None
      If a feature does not have all of the special types in this list, it is pruned.
      Features without special types are pruned through this logic.
      If None, then no features are pruned through this logic.
  required_raw_special_pairs : List[Tuple[str, List[str]]], default None
      If a feature does not satisfy the (raw_type, special_types) requirement of at least one of the elements in this list, it is pruned.
      Identical to getting the union of calling get_features(valid_raw_types=[raw_type], required_special_types=special_types) for every
      element of (raw_type, special_types) in required_raw_special_pairs
      If raw_type is None, then any feature will satisfy the raw type requirement.
      If special_types is None, then any feature will satisfy the special type requirement (including those with no special types).
  required_exact : bool, default False
      If True, then if a feature does not have the exact same special types (with no extra special types) as required_special_types, it is pruned.
      This is also applied to required_raw_special_pairs if specified.
      Has no effect if required_special_types and required_raw_special_pairs are None.
  required_at_least_one_special : bool, default False
      If True, then if a feature has zero special types, it is pruned.
  
  Returns
  -------
  features : list of feature names in feature metadata that satisfy all checks dictated by the parameters.
docstr_tok: ["Returns","a","list","of","features","held","within","the","feature","metadata","object","after","being","pruned","through","the","available","parameters",".","Parameters","--","--","--","--","--","valid_raw_types",":","list",",","default","None","If","a","feature","'s","raw","type","is","not","in","this","list",",","it","is","pruned",".","If","None",",","then","no","features","are","pruned","through","this","logic",".","valid_special_types",":","list",",","default","None","If","a","feature","has","a","special","type","not","in","this","list",",","it","is","pruned",".","Features","without","special","types","are","never","pruned","through","this","logic",".","If","None",",","then","no","features","are","pruned","through","this","logic",".","invalid_raw_types",":","list",",","default","None","If","a","feature","'s","raw","type","is","in","this","list",",","it","is","pruned",".","If","None",",","then","no","features","are","pruned","through","this","logic",".","invalid_special_types",":","list",",","default","None","If","a","feature","has","a","special","type","in","this","list",",","it","is","pruned",".","Features","without","special","types","are","never","pruned","through","this","logic",".","If","None",",","then","no","features","are","pruned","through","this","logic",".","required_special_types",":","list",",","default","None","If","a","feature","does","not","have","all","of","the","special","types","in","this","list",",","it","is","pruned",".","Features","without","special","types","are","pruned","through","this","logic",".","If","None",",","then","no","features","are","pruned","through","this","logic",".","required_raw_special_pairs",":","List","[","Tuple","[","str",",","List","[","str","]","]","]",",","default","None","If","a","feature","does","not","satisfy","the","(","raw_type",",","special_types",")","requirement","of","at","least","one","of","the","elements","in","this","list",",","it","is","pruned",".","Identical","to","getting","the","union","of","calling","get_features","(","valid_raw_types=","[","raw_type","]",",","required_special_types=special_types",")","for","every","element","of","(","raw_type",",","special_types",")","in","required_raw_special_pairs","If","raw_type","is","None",",","then","any","feature","will","satisfy","the","raw","type","requirement",".","If","special_types","is","None",",","then","any","feature","will","satisfy","the","special","type","requirement","(","including","those","with","no","special","types",")",".","required_exact",":","bool",",","default","False","If","True",",","then","if","a","feature","does","not","have","the","exact","same","special","types","(","with","no","extra","special","types",")","as","required_special_types",",","it","is","pruned",".","This","is","also","applied","to","required_raw_special_pairs","if","specified",".","Has","no","effect","if","required_special_types","and","required_raw_special_pairs","are","None",".","required_at_least_one_special",":","bool",",","default","False","If","True",",","then","if","a","feature","has","zero","special","types",",","it","is","pruned",".","Returns","--","--","--","-","features",":","list","of","feature","names","in","feature","metadata","that","satisfy","all","checks","dictated","by","the","parameters","."]
code: def get_features(
      self,
      valid_raw_types: list = None,
      valid_special_types: list = None,
      invalid_raw_types: list = None,
      invalid_special_types: list = None,
      required_special_types: list = None,
      required_raw_special_pairs: List[
          Tuple[str, Union[List[str], Set[str]]]
      ] = None,
      required_exact=False,
      required_at_least_one_special=False,
  ) -> List[str]:
      """
      Returns a list of features held within the feature metadata object after being pruned through the available parameters.
  
      Parameters
      ----------
      valid_raw_types : list, default None
          If a feature's raw type is not in this list, it is pruned.
          If None, then no features are pruned through this logic.
      valid_special_types : list, default None
          If a feature has a special type not in this list, it is pruned.
          Features without special types are never pruned through this logic.
          If None, then no features are pruned through this logic.
      invalid_raw_types : list, default None
          If a feature's raw type is in this list, it is pruned.
          If None, then no features are pruned through this logic.
      invalid_special_types : list, default None
          If a feature has a special type in this list, it is pruned.
          Features without special types are never pruned through this logic.
          If None, then no features are pruned through this logic.
      required_special_types : list, default None
          If a feature does not have all of the special types in this list, it is pruned.
          Features without special types are pruned through this logic.
          If None, then no features are pruned through this logic.
      required_raw_special_pairs : List[Tuple[str, List[str]]], default None
          If a feature does not satisfy the (raw_type, special_types) requirement of at least one of the elements in this list, it is pruned.
          Identical to getting the union of calling get_features(valid_raw_types=[raw_type], required_special_types=special_types) for every
          element of (raw_type, special_types) in required_raw_special_pairs
          If raw_type is None, then any feature will satisfy the raw type requirement.
          If special_types is None, then any feature will satisfy the special type requirement (including those with no special types).
      required_exact : bool, default False
          If True, then if a feature does not have the exact same special types (with no extra special types) as required_special_types, it is pruned.
          This is also applied to required_raw_special_pairs if specified.
          Has no effect if required_special_types and required_raw_special_pairs are None.
      required_at_least_one_special : bool, default False
          If True, then if a feature has zero special types, it is pruned.
  
      Returns
      -------
      features : list of feature names in feature metadata that satisfy all checks dictated by the parameters.
  
      """
      features = list(self.type_map_raw.keys())
  
      if valid_raw_types is not None:
          features = [
              feature
              for feature in features
              if self.get_feature_type_raw(feature) in valid_raw_types
          ]
      if valid_special_types is not None:
          valid_special_types_set = set(valid_special_types)
          features = [
              feature
              for feature in features
              if not valid_special_types_set.isdisjoint(
                  self.get_feature_types_special(feature)
              )
              or not self.get_feature_types_special(feature)
          ]
      if invalid_raw_types is not None:
          features = [
              feature
              for feature in features
              if self.get_feature_type_raw(feature)
              not in invalid_raw_types
          ]
      if invalid_special_types is not None:
          invalid_special_types_set = set(invalid_special_types)
          features = [
              feature
              for feature in features
              if invalid_special_types_set.isdisjoint(
                  self.get_feature_types_special(feature)
              )
          ]
      if required_special_types is not None:
          required_special_types_set = set(required_special_types)
          if required_exact:
              features = [
                  feature
                  for feature in features
                  if required_special_types_set
                  == set(self.get_feature_types_special(feature))
              ]
          else:
              features = [
                  feature
                  for feature in features
                  if required_special_types_set.issubset(
                      self.get_feature_types_special(feature)
                  )
              ]
      if required_at_least_one_special:
          features = [
              feature
              for feature in features
              if self.get_feature_types_special(feature)
          ]
      if required_raw_special_pairs is not None:
          features_og = copy.deepcopy(features)
          features_to_keep = []
          for valid_raw, valid_special in required_raw_special_pairs:
              if valid_special is not None:
                  valid_special = set(valid_special)
              features_to_keep_inner = []
              for feature in features:
                  feature_type_raw = self.get_feature_type_raw(feature)
                  feature_types_special = set(
                      self.get_feature_types_special(feature)
                  )
                  if valid_raw is None or feature_type_raw == valid_raw:
                      if valid_special is None:
                          features_to_keep_inner.append(feature)
                      elif required_exact:
                          if valid_special == feature_types_special:
                              features_to_keep_inner.append(feature)
                      elif valid_special.issubset(
                          feature_types_special
                      ):
                          features_to_keep_inner.append(feature)
              features = [
                  feature
                  for feature in features
                  if feature not in features_to_keep_inner
              ]
              features_to_keep += features_to_keep_inner
          features = [
              feature
              for feature in features_og
              if feature in features_to_keep
          ]
  
      return features
  
imports: import copy
  import logging
  from collections import defaultdict
  from typing import Any, Dict, List, Set, Tuple, Union
  import pandas
  from .infer_types import get_type_group_map_special, get_type_map_raw
label_desc: Use image node_id 3 for calling the FeatureMetadata obj's underlying member method code with example usage: obj.get_features(valid_raw_types, valid_special_types, invalid_raw_types, invalid_special_types, required_special_types, required_raw_special_pairs, required_exact, required_at_least_one_special) and returns: features