def _process_between_filter_directive(filter_operation_info, location, context, parameters):
    """Return a Filter basic block that checks that a field is between two values, inclusive.

    Args:
        filter_operation_info: FilterOperationInfo object, containing the directive and field info
                               of the field where the filter is to be applied.
        location: Location where this filter is used.
        context: dict, various per-compilation data (e.g. declared tags, whether the current block
                 is optional, etc.). May be mutated in-place in this function!
        parameters: list of 2 elements, specifying the time range in which the data must lie;
                    if either of the elements is optional and missing,
                    their side of the check is assumed to be True

    Returns:
        a Filter basic block that performs the range check
    """
    filtered_field_type = filter_operation_info.field_type
    filtered_field_name = filter_operation_info.field_name

    argument_inferred_type = strip_non_null_from_type(filtered_field_type)
    arg1_expression, arg1_non_existence = _represent_argument(
        location, context, parameters[0], argument_inferred_type)
    arg2_expression, arg2_non_existence = _represent_argument(
        location, context, parameters[1], argument_inferred_type)

    lower_bound_clause = expressions.BinaryComposition(
        u'>=', expressions.LocalField(filtered_field_name), arg1_expression)
    if arg1_non_existence is not None:
        # The argument is optional, and if it doesn't exist, this side of the check should pass.
        lower_bound_clause = expressions.BinaryComposition(
            u'||', arg1_non_existence, lower_bound_clause)

    upper_bound_clause = expressions.BinaryComposition(
        u'<=', expressions.LocalField(filtered_field_name), arg2_expression)
    if arg2_non_existence is not None:
        # The argument is optional, and if it doesn't exist, this side of the check should pass.
        upper_bound_clause = expressions.BinaryComposition(
            u'||', arg2_non_existence, upper_bound_clause)

    filter_predicate = expressions.BinaryComposition(
        u'&&', lower_bound_clause, upper_bound_clause)
    return blocks.Filter(filter_predicate)
Return a Filter basic block that checks that a field is between two values, inclusive.

    Args:
        filter_operation_info: FilterOperationInfo object, containing the directive and field info
                               of the field where the filter is to be applied.
        location: Location where this filter is used.
        context: dict, various per-compilation data (e.g. declared tags, whether the current block
                 is optional, etc.). May be mutated in-place in this function!
        parameters: list of 2 elements, specifying the time range in which the data must lie;
                    if either of the elements is optional and missing,
                    their side of the check is assumed to be True

    Returns:
        a Filter basic block that performs the range check