code: def dump(self):
          
          try:
              import yaml
              cfg_file = self._cfg_file()
              cfg_dir, __ = os.path.split(cfg_file)
              os.makedirs(cfg_dir, exist_ok=True)
              with open(cfg_file, 'w') as f:
                  yaml.dump(self, f)
          except ImportError as err:
              raise RuntimeError(
                  'Cannot dump the configuration settings to file. You need to '
                  'install the necessary dependencies (pyyaml, appdirs).'
              ) from err
docs: Writes the changes to the configuration file.