code: def locked_put(self, credentials):
          
          keyring.set_password(self._service_name, self._user_name,
                               credentials.to_json())
docs: Write Credentials to file.
  
          Args:
              credentials: Credentials, the credentials to store.