code: def yaml_dump_hook(cfg, text: bool=False):
      
  
      data = cfg.config.dump()
      if not text:
          yaml.dump(data, cfg.fd, Dumper=cfg.dumper, default_flow_style=False)
      else:
          return yaml.dump(data, Dumper=cfg.dumper, default_flow_style=False)
docs: Dumps all the data into a YAML file.