def METHOD_NAME(self, path, modules=[]):
    """
    Save all the config settings to a file.
    A list of modules to include may be passed in. An empty list results
    in all module configs being saved.
    """
    # Load all modules, or only requested modules
    if len(modules) == 0:
        modules = au.list_local()
    for module_name in modules:
        self._load_module_conf(module_name, build_all=False)
    self._build_all()
    # Delete configs for modules in the job conf but not in the modules list
    extra_modules = list(set(self._all["modules"]) - set(modules))
    for module_name in extra_modules:
        del self._all["modules"][module_name]
    # Write to a file
    with open(path, "w") as wf:
        wf.write(yaml.dump(self._all, default_flow_style=False))