code: def parse_file(self, config: Union[Path, str, RawConfigParser, 'ConfigObject'], max_index=None, config_directory=None):
          
          self.config_directory = config_directory
  
          if isinstance(config, Path):
              config = str(config)
  
          if isinstance(config, str):
              if not os.path.isfile(config):
                  raise FileNotFoundError(config)
              self.raw_config_parser = RawConfigParser()
              self.raw_config_parser.read(config, encoding='utf8')
              config = self.raw_config_parser
          elif isinstance(config, RawConfigParser):
              self.raw_config_parser = config
          elif not isinstance(config, ConfigObject):
              raise TypeError("The config should be a String, RawConfigParser of a ConfigObject")
          for header_name, header in self.headers.items():
              try:
                  header.parse_file(config[header_name], max_index=max_index, config_directory=config_directory)
              except KeyError:
                  pass  # skip this header as it does not exist
          return self
docs: Parses the file internally setting values
          :param config: an instance of RawConfigParser or a string to a .cfg file
          :param config_directory: The location of this config file on disk
          :return: None