Write a set a datapoints into multiple series by key or series ID.
        Each :class:`tempodb.protocol.objects.DataPoint` object should have
        either a key or id attribute set that indicates which series it will
        be written into::

            [
                {"t": "2012-...", "key": "foo", "v": 1},
                {"t": "2012-...", "id": "bar", "v": 1}
            ]

        If a non-existent key or ID is passed in, a series will be created
        for that key/ID and the data point written in to the new series.

        :param list data: a list of DataPoints to write
        :rtype: :class:`tempodb.response.Response` object

def write_multi(self, data):
        """Write a set a datapoints into multiple series by key or series ID.
        Each :class:`tempodb.protocol.objects.DataPoint` object should have
        either a key or id attribute set that indicates which series it will
        be written into::

            [
                {"t": "2012-...", "key": "foo", "v": 1},
                {"t": "2012-...", "id": "bar", "v": 1}
            ]

        If a non-existent key or ID is passed in, a series will be created
        for that key/ID and the data point written in to the new series.

        :param list data: a list of DataPoints to write
        :rtype: :class:`tempodb.response.Response` object"""

        url = 'multi/'

        dlist = [d.to_dictionary() for d in data]
        body = json.dumps(dlist)
        resp = self.session.post(url, body)
        return resp