def the_local_prediction_is(step, prediction):
    if (isinstance(world.local_prediction, list) or
        isinstance(world.local_prediction, tuple)):
        local_prediction = world.local_prediction[0]
    elif isinstance(world.local_prediction, dict):
        local_prediction = world.local_prediction['prediction']
    else:
        local_prediction = world.local_prediction
    try:
        local_model = world.local_model
        if not isinstance(world.local_model, LogisticRegression):
            if isinstance(local_model, MultiModel):
                local_model = local_model.models[0]
            if local_model.tree.regression:
                local_prediction = round(float(local_prediction), 4)
                prediction = round(float(prediction), 4)
    except AttributeError:
        local_model = world.local_ensemble.multi_model.models[0]
        if local_model.tree.regression:
            local_prediction = round(float(local_prediction), 4)
            prediction = round(float(prediction), 4)

    if local_prediction == prediction:
        assert True
    else:
        assert False, "found: %s, expected %s" % (local_prediction, prediction)

#@step(r'the local probability is "(.*)"')
dataset/ETHPy150Open bigmlcom/python/bigml/tests/compare_predictions_steps.py/the_local_prediction_is/original