def _valid_error(error_part):
    """Is `error_part` a valid error_part from a JSON-RPC 2.0 response object?

    `error_part` should just be the \"error\" member (which should be a
    dictionary). It shouldn't be a full response.

    """
    # We just check that error_part has the right footprint. Don't worry about the
    # specifics. If it has the footpring, it's almost certainly JSON-RPC. We
    # aren't checking the validity of Porthole's encoding mechanisms - just
    # that we did in fact receive a JSON-RPC response.
    return (
        isinstance(error_part, dict)
        and "code" in error_part
        and "message" in error_part
        and "data" in error_part
    )