<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def set_permission(self, dataset_identifier, permission="private", content_type="json"):
        '''
        Set a dataset's permissions to private or public
        Options are private, public

        '''
        resource = _format_old_api_request(dataid=dataset_identifier, content_type=content_type)

        params = {
            "method": "setPermission",
            "value": "public.read" if permission == "public" else permission
        }

        return self._perform_request("put", resource, params=params)