<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save_credentials(self, profile):
 """ Saves credentials to a dotfile so you can open them grab them later. Parameters profile: str name for your profile (i.e. "dev", "prod") """

        filename = profile_path(S3_PROFILE_ID, profile)
        creds = {
            "access_key": self.access_key,
            "secret_key": self.secret_key
        }
        dump_to_json(filename, creds)