'Render a signed request according to signature type
Returns a 3-tuple containing the request URI, headers, and body.
If the formencode argument is True and the body contains parameters, it
is escaped and returned as a valid formencoded string.'

def _render(self, request, formencode=False, realm=None):

    (uri, headers, body) = (request.uri, request.headers, request.body)
    if (self.signature_type == SIGNATURE_TYPE_AUTH_HEADER):
        headers = parameters.prepare_headers(request.oauth_params, request.headers, realm=realm)
    elif ((self.signature_type == SIGNATURE_TYPE_BODY) and (request.decoded_body is not None)):
        body = parameters.prepare_form_encoded_body(request.oauth_params, request.decoded_body)
        if formencode:
            body = urlencode(body)
        headers[u'Content-Type'] = u'application/x-www-form-urlencoded'
    elif (self.signature_type == SIGNATURE_TYPE_QUERY):
        uri = parameters.prepare_request_uri_query(request.oauth_params, request.uri)
    else:
        raise ValueError(u'Unknown    signature    type    specified.')
    return (uri, headers, body)
