def setAccessPolicyResponse(
        self, pid, accessPolicy, serialVersion, vendorSpecific=None
    ):
        """CNAuthorization.setAccessPolicy(session, pid, accessPolicy, serialVersion) →
        boolean https://releases.dataone.org/online/api-
        documentation-v2.0.1/apis/CN_APIs.html#CNAuthorization.setAccessPolicy.

        Args:
          pid:
          accessPolicy:
          serialVersion:
          vendorSpecific:

        Returns:

        """
        mmp_dict = {
            'serialVersion': str(serialVersion),
            'accessPolicy': ('accessPolicy.xml', accessPolicy.toxml('utf-8')),
        }
        return self.PUT(['accessRules', pid], fields=mmp_dict, headers=vendorSpecific)
CNAuthorization.setAccessPolicy(session, pid, accessPolicy, serialVersion) →
        boolean https://releases.dataone.org/online/api-
        documentation-v2.0.1/apis/CN_APIs.html#CNAuthorization.setAccessPolicy.

        Args:
          pid:
          accessPolicy:
          serialVersion:
          vendorSpecific:

        Returns: