code: def save(self, config_loc=None):
          
          if not os.path.exists(_USER_CONFIG_DIR):
              """create directory if not exists"""
              os.makedirs(_USER_CONFIG_DIR)
          with open(_DEFAULT_PATH, 'w') as f:
              json.dump({'key': self._key, 'base_url': self._base_url,
                         'username': self._username}, f)
docs: Saves current user credentials to user directory.
  
          Args:
              config_loc (str, optional): Location where credentials are to be
                  stored. If no argument is provided, it will be send to the
                  default location.
  
          Example:
  
              .. code::
  
                  from cartoframes import Credentials
                  creds = Credentials(username='eschbacher', key='abcdefg')
                  creds.save()  # save to default location