code: def _update(self, **kwargs):
          '''Update only draft or legacy policies
  
          Published policies cannot be updated
          :raises: OperationNotSupportedOnPublishedPolicy
          '''
  
          legacy = kwargs.pop('legacy', False)
          tmos_ver = self._meta_data['bigip']._meta_data['tmos_version']
          self._filter_version_specific_options(tmos_ver, **kwargs)
          if 'Drafts' not in self._meta_data['uri'] and \
                  LooseVersion(tmos_ver) >= LooseVersion('12.1.0') and \
                  not legacy:
              msg = 'Update operation not allowed on a published policy.'
              raise OperationNotSupportedOnPublishedPolicy(msg)
          super(Policy, self)._update(**kwargsf _update(self, **kwargs):
          '''Update only draft or legacy policies
  
          Published policies cannot be updated
          :raises: OperationNotSupportedOnPublishedPolicy
          '''
  
          legacy = kwargs.pop('legacy', False)
          tmos_ver = self._meta_data['bigip']._meta_data['tmos_version']
          self._filter_version_specific_options(tmos_ver, **kwargs)
          if 'Drafts' not in self._meta_data['uri'] and \
                  LooseVersion(tmos_ver) >= LooseVersion('12.1.0') and \
                  not legacy:
              msg = 'Update operation not allowed on a published policy.'
              raise OperationNotSupportedOnPublishedPolicy(msg)
          super(Policy, self)._update(**kwargs)
docs: Update only draft or legacy policies
  
          Published policies cannot be updated
          :raises: OperationNotSupportedOnPublishedPolicy