'Makes a request to Swift with retries.
:param method: HTTP method of request.
:param path: Path of request.
:param headers: Headers to be sent with request.
:param acceptable_statuses: List of acceptable statuses for request.
:param body_file: Body file to be passed along with request,
defaults to None.
:returns: Response object on success.
:raises UnexpectedResponse: Exception raised when make_request() fails
to get a response with an acceptable status
:raises Exception: Exception is raised when code fails in an
unexpected way.'

def make_request(self, method, path, headers, acceptable_statuses, body_file=None):

    headers = dict(headers)
    headers['user-agent'] = self.user_agent
    resp = exc_type = exc_value = exc_traceback = None
    for attempt in range(self.request_tries):
        req = Request.blank(path, environ={'REQUEST_METHOD': method}, headers=headers)
        if (body_file is not None):
            if hasattr(body_file, 'seek'):
                body_file.seek(0)
            req.body_file = body_file
        try:
            resp = req.get_response(self.app)
            if ((resp.status_int in acceptable_statuses) or ((resp.status_int // 100) in acceptable_statuses)):
                return resp
        except (Exception, Timeout):
            (exc_type, exc_value, exc_traceback) = exc_info()
        if (attempt < (self.request_tries - 1)):
            sleep((2 ** (attempt + 1)))
    if resp:
        raise UnexpectedResponse((_('Unexpected    response:    %s') % resp.status), resp)
    if exc_type:
        six.reraise(exc_type(*exc_value.args), None, exc_traceback)
