def _tear_down_response(data):
    """Helper function to extract header, payload and end from received response
    data."""
    response_header = data[2:17]
    # Below is actually not used
    response_payload_size = data[18]
    response_payload = data[19:-2]
    response_end = data[-2:]
    return response_header, response_payload, response_end