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

def publish(self, **kwargs):
        '''Publishing a draft policy is only applicable in TMOS 12.1 and up.

        This operation updates the meta_data['uri'] of the existing object
        and effectively moves a draft into a published state on the device.
        The self object is also updated with the response from a GET to the
        device.

        :raises: PolicyNotDraft
        '''

        assert 'Drafts' in self._meta_data['uri']
        assert self.status.lower() == 'draft'
        base_uri = self._meta_data['container']._meta_data['uri']
        requests_params = self._handle_requests_params(kwargs)
        session = self._meta_data['bigip']._meta_data['icr_session']
        if 'command' not in kwargs:
            kwargs['command'] = 'publish'
        if 'Drafts' not in self.name:
            kwargs['name'] = self.fullPath
        session.post(base_uri, json=kwargs, **requests_params)
        get_kwargs = {
            'name': self.name, 'partition': self.partition,
            'uri_as_parts': True
        }
        response = session.get(base_uri, **get_kwargs)
        json_data = response.json()
        self._local_update(json_data)
        self._activate_URI(json_data['selfLink'])