def handle_request(method, url, *args, **kwargs):
    response = requests.Response()
    response.status_code = 200
    relative_url = url.replace("http://api.xively.com/v2/", '')
    if relative_url in responses_by_url:
        response.raw = BytesIO(responses_by_url[relative_url])
    return response
dataset/ETHPy150Open xively/xively-python/docs/__init__.py/handle_request/original