code: def GenerateConfigFile(load_hook, dump_hook, **kwargs) -> ConfigFile:
      
      def ConfigFileGenerator(filename, safe_load: bool=True):
          cfg = ConfigFile(fd=filename, load_hook=load_hook, dump_hook=dump_hook, safe_load=safe_load, **kwargs)
          return cfg
  
      return ConfigFileGenerator
docs: Generates a ConfigFile object using the specified hooks.
  
      These hooks should be functions, and have one argument.
      When a hook is called, the ConfigFile object is passed to it. Use this to load your data from the fd object, or request, or whatever.
  
      This returns a ConfigFile object.