docstr: Configuration Reader. Reads configuration file in `config_file`.
  
  If some default field has multiple configurations to be loaded independently,
  use default_fields. Default fields are expected to be in same configuration as
  Hydra. This handles default fields with lists.
  
  For an example of `default_fields` usage, see the configuration for Benchmarks.
  
  Parameters
  ----------
  config_file : Path
      Path to the configuration file.
  default_fields : Iterable[str], optional
      Fields with configurations associated, with lists.
docstr_tok: ["Configuration","Reader",".","Reads","configuration","file","in","`","config_file","`",".","If","some","default","field","has","multiple","configurations","to","be","loaded","independently",",","use","default_fields",".","Default","fields","are","expected","to","be","in","same","configuration","as","Hydra",".","This","handles","default","fields","with","lists",".","For","an","example","of","`","default_fields","`","usage",",","see","the","configuration","for","Benchmarks",".","Parameters","--","--","--","--","--","config_file",":","Path","Path","to","the","configuration","file",".","default_fields",":","Iterable","[","str","]",",","optional","Fields","with","configurations","associated",",","with","lists","."]
code: def __init__(
      self, config_file: Path, default_fields: tuple[str] = ()
  ):
      """Configuration Reader. Reads configuration file in `config_file`.
  
      If some default field has multiple configurations to be loaded independently,
      use default_fields. Default fields are expected to be in same configuration as
      Hydra. This handles default fields with lists.
  
      For an example of `default_fields` usage, see the configuration for Benchmarks.
  
      Parameters
      ----------
      config_file : Path
          Path to the configuration file.
      default_fields : Iterable[str], optional
          Fields with configurations associated, with lists.
      """
      self.config_file = config_file
      config = self.read_config(config_file)
      self.default_fields = default_fields
      # For now, there is no need to create recursive methods here.
      for field in self.default_fields:
          values = config[field]
          field_configs = []
          for value in values:
              value_config_file = config_file.parent / field / value
              value_config = self.read_config(value_config_file)
              field_configs.append(value_config)
          setattr(config, field, field_configs)
      self.config = config
  
file_path: aequitas/src/aequitas/fairflow/utils/config.py
imports: import os
  from pathlib import Path
  import hydra
  from hydra.core.global_hydra import GlobalHydra
  from omegaconf import DictConfig
label_desc: Use image node_id 1 to create a new ConfigReader object  with example: obj = ConfigReader(config_file, default_fields)