docs: def commit_batch_requests(self):
          ''' Commits the batch requests. '''
  
          batch_boundary = b'batch_' + _new_boundary()
          changeset_boundary = b'changeset_' + _new_boundary()
  
          # Commits batch only the requests list is not empty.
          if self.batch_requests:
              request = HTTPRequest()
              request.method = 'POST'
              request.host = self.batch_requests[0].host
              request.path = '/$batch'
              request.headers = [
                  ('Content-Type', 'multipart/mixed; boundary=' + \
                      batch_boundary.decode('utf-8')),
                  ('Accept', 'application/atom+xml,application/xml'),
                  ('Accept-Charset', 'UTF-8')]
  
              request.body = b'--' + batch_boundary + b'\n'
              request.body += b'Content-Type: multipart/mixed; boundary='
              request.body += changeset_boundary + b'\n\n'
  
              content_id = 1
  
              # Adds each request body to the POST data.
              for batch_request in self.batch_requests:
                  request.body += b'--' + changeset_boundary + b'\n'
                  request.body += b'Content-Type: application/http\n'
                  request.body += b'Content-Transfer-Encoding: binary\n\n'
                  request.body += batch_request.method.encode('utf-8')
                  request.body += b' http://'
                  request.body += batch_request.host.encode('utf-8')
                  request.body += batch_request.path.encode('utf-8')
                  request.body += b' HTTP/1.1\n'
                  request.body += b'Content-ID: '
                  request.body += str(content_id).encode('utf-8') + b'\n'
                  content_id += 1
  
                  # Add different headers for different type requests.
                  if not batch_request.method == 'DELETE':
                      request.body += \
                          b'Content-Type: application/atom+xml;type=entry\n'
                      for name, value in batch_request.headers:
                          if name == 'If-Match':
                              request.body += name.encode('utf-8') + b': '
                              request.body += value.encode('utf-8') + b'\n'
                              break
                      request.body += b'Content-Length: '
                      request.body += str(len(batch_request.body)).encode('utf-8')
                      request.body += b'\n\n'
                      request.body += batch_request.body + b'\n'
                  else:
                      for name, value in batch_request.headers:
                          # If-Match should be already included in
                          # batch_request.headers, but in case it is missing,
                          # just add it.
                          if name == 'If-Match':
                              request.body += name.encode('utf-8') + b': '
                              request.body += value.encode('utf-8') + b'\n\n'
                              break
                      else:
                          request.body += b'If-Match: *\n\n'
  
              request.body += b'--' + changeset_boundary + b'--' + b'\n'
              request.body += b'--' + batch_boundary + b'--'
  
              request.path, request.query = _update_request_uri_query(request)
              request.headers = _update_storage_table_header(request)
              self.authentication.sign_request(request)
  
              # Submit the whole request as batch request.
              response = self.perform_request(request)
              if response.status >= 300:
                  # This exception will be caught by the general error handler
                  # and raised as an azure http exception
                  raise HTTPError(response.status,
                                  _ERROR_BATCH_COMMIT_FAIL,
                                  self.respheader,
                                  response.body)
  
              # http://www.odata.org/documentation/odata-version-2-0/batch-processing/
              # The body of a ChangeSet response is either a response for all the
              # successfully processed change request within the ChangeSet,
              # formatted exactly as it would have appeared outside of a batch, 
              # or a single response indicating a failure of the entire ChangeSet.
              responses = self._parse_batch_response(response.body)
              if responses and responses[0].status >= 300:
                  self._report_batch_error(responses[0])