def save_to_well_known_file(credentials, well_known_file=None):
<EOL>if well_known_file is None:<EOL><INDENT>well_known_file = _get_well_known_file()<EOL><DEDENT>config_dir = os.path.dirname(well_known_file)<EOL>if not os.path.isdir(config_dir):<EOL><INDENT>raise OSError(<EOL>'<STR_LIT>'.format(config_dir))<EOL><DEDENT>credentials_data = credentials.serialization_data<EOL>_save_private_file(well_known_file, credentials_data)<EOL>
Save the provided GoogleCredentials to the well known file.

    Args:
        credentials: the credentials to be saved to the well known file;
                     it should be an instance of GoogleCredentials
        well_known_file: the name of the file where the credentials are to be
                         saved; this parameter is supposed to be used for
                         testing only