Add annotations to the given item

        :type item_url: String or Item
        :param item_url: the URL of the item corresponding to the annotation,
            or an Item object
        :type annotation: list
        :param annotations: the annotations as a list of dictionaries, each with keys '@type', 'label', 'start', 'end' and 'type'

        :rtype: String
        :returns: the server's success message, if successful

        :raises: APIError if the upload was not successful
        :raises: Exception if the annotations are malformed (missing a required key)

def add_annotations(self, item_url, annotations):
        """Add annotations to the given item

        :type item_url: String or Item
        :param item_url: the URL of the item corresponding to the annotation,
            or an Item object
        :type annotation: list
        :param annotations: the annotations as a list of dictionaries, each with keys '@type', 'label', 'start', 'end' and 'type'

        :rtype: String
        :returns: the server's success message, if successful

        :raises: APIError if the upload was not successful
        :raises: Exception if the annotations are malformed (missing a required key)
        """
        adict = {'@context': "https://alveo-staging1.intersect.org.au/schema/json-ld"}

        for ann in annotations:
            # verify that we have the required properties
            for key in ('@type', 'label', 'start', 'end', 'type'):
                if key not in ann.keys():
                    raise Exception("required key '%s' not present in annotation" % key)
        adict['@graph'] = annotations

        resp = self.api_request(str(item_url) + '/annotations', method='POST', data=json.dumps(adict))
        return self.__check_success(resp)