def METHOD_NAME(self):
    is_new = not utils.file_exists(self.filename)
    with open(self.filename, 'wb') as f:
        if is_new:
            utils.change_permissions(self.filename, 0o600)
        pickle.dump(self.accounts, f, protocol=2)