docs: def write_config_file(config_instance, appdirs=DEFAULT_APPDIRS,
          file_name=DEFAULT_CONFIG_FILENAME):
      """
      Write a ConfigParser instance to file at the correct location.
  
      Args:
          config_instance: Config instance to safe to file.
          appdirs (HamsterAppDirs, optional): ``HamsterAppDirs`` instance storing app/user specific
              path information.
          file_name (text_type, optional): Name of the config file. Defaults to
          ``DEFAULT_CONFIG_FILENAME``.
  
      Returns:
          SafeConfigParser: Instance written to file.
      """
  
      path = get_config_path(appdirs, file_name)
      with open(path, 'w') as fobj:
          config_instance.write(fobj)
      return config_instance