def data1_in_range(min_value, max_value):
    """ Returns a function that matches data1 to a range of values.
    The value is matched if data1 falls between min_value and max_value
    inclusively.
    """
    return lambda m: min_value <= m.data1 <= max_value