class_docstr: When expanding the columns from variables to features, this class keeps
  track of the 1:m mapping between the collapsed and expanded columns.
  
  Args:
      schema: A dictionary mapping a variable (can be any hashable object) to
          a data type. Permissible data types are stored in the class
          attribute ``PERMISSIBLE_TYPES``.
class_docstr_tok: ["When","expanding","the","columns","from","variables","to","features",",","this","class","keeps","track","of","the","1",":","m","mapping","between","the","collapsed","and","expanded","columns",".","Args",":","schema",":","A","dictionary","mapping","a","variable","(","can","be","any","hashable","object",")","to","a","data","type",".","Permissible","data","types","are","stored","in","the","class","attribute","``","PERMISSIBLE_TYPES","``","."]
docstr: Get the feature name(s) corresponding to the variable. If none provided,
  returns all features.
  
  Returns:
       Returns all feature names corresponding to a variable/node.
          - For binary and continuous variables, this is the variable/node
            itself.
          - For categorical variables, it returns a List of Hashables
docstr_tok: ["Get","the","feature","name","(","s",")","corresponding","to","the","variable",".","If","none","provided",",","returns","all","features",".","Returns",":","Returns","all","feature","names","corresponding","to","a","variable\/node",".","-","For","binary","and","continuous","variables",",","this","is","the","variable\/node","itself",".","-","For","categorical","variables",",","it","returns","a","List","of","Hashables"]
code: def get_feature_names(
      self, var: Optional[Hashable] = None
  ) -> Union[Hashable, List[Hashable]]:
      """
      Get the feature name(s) corresponding to the variable. If none provided,
      returns all features.
  
      Returns:
           Returns all feature names corresponding to a variable/node.
              - For binary and continuous variables, this is the variable/node
                itself.
              - For categorical variables, it returns a List of Hashables
      """
      if var is None:
          return self.feature_list
      if var not in self.variable_type_dict["categorical"]:
          return var
      return [k for k, v in self._cat_fte_var_dict.items() if v == var]
  
file_path: causalnex/causalnex/structure/categorical_variable_mapper.py
imports: import re
  from collections import OrderedDict
  from itertools import chain
  from typing import Dict, Hashable, Iterator, List, Optional, Set, Union
  from networkx.classes.reportviews import NodeView
label_desc: Use image node_id 8 for calling the VariableFeatureMapper obj's underlying member method code with example usage: obj.get_feature_names(var) and returns: unknown, self, var