def METHOD_NAME(self, data, query_expr=None):
    response = {}
    try:
        buf = data.read()
        buf = json.loads(buf)
    except json.JSONDecodeError:
        buf = ''
    response['data'] = buf
    response['error'] = data.code
    response['code'] = data.code
    response['error_msg'] = data.response.reason
    response['success'] = data.code
    if response['code'] == 200:
        response['search_after'] = response.get("data")['response']['events']['search_after']
        try:
           response['event_data'] = self.parseJson(response.get("data")['response']['events']['events'])
        except KeyError:
            self.logger.debug('events data not found in respose object %s', response)
            response['event_data'] = []
    elif response['error'] == 500 and "true" in response['error_msg']:
        response.update({"code": 200, "data": []})
    else:
        response["message"] = data.response.reason
    return response