Refactor the code by pulling save_to_well_known_file() to top level and renaming _get_credentials_data() to serialization_data() and making it a property.