def output_passes_filter(data, filter_from, filter_to):
    """
    Check if the data passes the given filter.
    :param data: The data tuple to check.
    :param filter_to: Filter to only values starting from this value...
    :param filter_from: ...Filter to only values ending with this value.
    :return: True if the data passes the filter, False otherwise.
    """
    if filter_from is None or filter_to is None:
        return True

    return data[1] == filter_from and data[2] == filter_to