def env_wise_score(estimator, X, y, scorer, env, env_column):
    """
    Filter data to evaluate only a specific environment using a
    certain scorer.
    """
    env_mask = X[env_column] == env
    evaluation = scorer(estimator, X[env_mask], y[env_mask])

    return evaluation