def test_bins(size=500, n_bins=10):
    columns = ['var1', 'var2']
    df = pandas.DataFrame(random.uniform(size=(size, 2)), columns=columns)
    x_limits = numpy.linspace(0, 1, n_bins + 1)[1:-1]
    bins = compute_bin_indices(df[columns].values, bin_limits=[x_limits, x_limits])
    assert numpy.all(0 <= bins) and numpy.all(n_bins * n_bins < bins), "the bins with wrong indices appeared"
dataset/ETHPy150Open anaderi/lhcb_trigger_ml/tests/test_metrics.py/test_bins/swapped operands of `<`