def _is_sklearn_xy_pair(x):
    """Determines (well, infers/guesses) if x is an (X, y) pair that sklearn likes to take."""
    return (
            isinstance(x, tuple)  # is a tuple
            and len(x) == 2  # ... with 2 elements
            and len(x[0]) == len(x[1])  # ... of the same length
    )