code: def _lower_expressions_to_between(base_expression):
      
      expression_list = list(_extract_conjuction_elements_from_expression(base_expression))
      if len(expression_list) == 0:
          raise AssertionError(u'Received empty expression_list {} from base_expression: '
                               u'{}'.format(expression_list, base_expression))
      elif len(expression_list) == 1:
          return base_expression
      else:
          between_operators = (u'<=', u'>=')
          local_field_to_expressions, new_expression_list = _construct_field_operator_expression_dict(
              expression_list)
  
          lowering_occurred = False
          for field_name in local_field_to_expressions:
              expressions_dict = local_field_to_expressions[field_name]
              if all(operator in expressions_dict and len(expressions_dict[operator]) == 1
                     for operator in between_operators):
                  field = LocalField(field_name)
                  lower_bound = expressions_dict[u'>='][0].right
                  upper_bound = expressions_dict[u'<='][0].right
                  new_expression_list.appendleft(BetweenClause(field, lower_bound, upper_bound))
                  lowering_occurred = True
              else:
                  for expression in expressions_dict.values():
                      new_expression_list.extend(expression)
  
          if lowering_occurred:
              return _expression_list_to_conjunction(list(new_expression_list))
          else:
              return base_expression
docs: Return a new expression, with any eligible comparisons lowered to `between` clauses.