code: function variableToRule(name, ranges) {
    const terms = ['or'];
    ranges.forEach((clause) => {
      terms.push({
        type: '5C',
        terms: [
          clause.interval[0],
          endpointToRuleOperator[clause.endpoints[0]],
          name,
          endpointToRuleOperator[clause.endpoints[1]],
          clause.interval[1],
        ],
      });
    });
    if (terms.length === 2) {
      // one range, don't need the logical 'or'
      return terms[1];
    }
    return {
      type: 'logical',
      terms,
    };
  }
docs: ----------------------------------------------------------------------------