Modify the metadata for the given collection.

        :param collection_uri: The URI that references the collection
        :type collection_uri: String

        :param metadata: a dictionary of metadata values to add/modify
        :type metadata: Dict

        :rtype: String
        :returns: a message confirming that the metadata is modified

        :raises: APIError if the request was not successful

def modify_collection_metadata(self, collection_uri, metadata, replace=None, name=''):
        """Modify the metadata for the given collection.

        :param collection_uri: The URI that references the collection
        :type collection_uri: String

        :param metadata: a dictionary of metadata values to add/modify
        :type metadata: Dict

        :rtype: String
        :returns: a message confirming that the metadata is modified

        :raises: APIError if the request was not successful
        """

        payload = {
                    'collection_metadata': metadata,
                    'name': name
                   }

        if replace is not None:
            payload['replace'] = replace

        response = self.api_request(collection_uri, method='PUT', data=json.dumps(payload))

        return self.__check_success(response)