'Serialize batch request, send to server, process response.
Args:
http: httplib2.Http, an http object to be used to make the request with.
order: list, list of request ids in the order they were added to the
batch.
request: list, list of request objects to send.
Raises:
httplib2.HttpLib2Error if a transport error has occured.
googleapiclient.errors.BatchError if the response is the wrong format.'

def _execute(self, http, order, requests):

    message = MIMEMultipart('mixed')
    setattr(message, '_write_headers', (lambda self: None))
    for request_id in order:
        request = requests[request_id]
        msg = MIMENonMultipart('application', 'http')
        msg['Content-Transfer-Encoding'] = 'binary'
        msg['Content-ID'] = self._id_to_header(request_id)
        body = self._serialize_request(request)
        msg.set_payload(body)
        message.attach(msg)
    fp = StringIO()
    g = Generator(fp, mangle_from_=False)
    g.flatten(message, unixfrom=False)
    body = fp.getvalue()
    headers = {}
    headers['content-type'] = ('multipart/mixed;    boundary="%s"' % message.get_boundary())
    (resp, content) = http.request(self._batch_uri, method='POST', body=body, headers=headers)
    if (resp.status >= 300):
        raise HttpError(resp, content, uri=self._batch_uri)
    header = ('content-type:    %s\r\n\r\n' % resp['content-type'])
    if six.PY3:
        content = content.decode('utf-8')
    for_parser = (header + content)
    parser = FeedParser()
    parser.feed(for_parser)
    mime_response = parser.close()
    if (not mime_response.is_multipart()):
        raise BatchError('Response    not    in    multipart/mixed    format.', resp=resp, content=content)
    for part in mime_response.get_payload():
        request_id = self._header_to_id(part['Content-ID'])
        (response, content) = self._deserialize_response(part.get_payload())
        if isinstance(content, six.text_type):
            content = content.encode('utf-8')
        self._responses[request_id] = (response, content)
