def _check_weights(weights):
    """Check to make sure weights are valid"""
    if (None, 'uniform', 'distance') in weights:
        return weights
    elif callable(weights):
        return weights
    else:
        raise ValueError("weights not recognized: should be 'uniform', "
                         "'distance', or a callable function")
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/neighbors/base.py/_check_weights/swapped operands of `in`