code: function getTermsForCollectingAddition(node) {
    let terms = {};
  
    for(let i = 0; i < node.args.length; i++) {
      const child = node.args[i];
  
      if (Node.PolynomialTerm.isPolynomialTerm(child)) {
        const termName = getTermName(child, '+');
        terms = Util.appendToArrayInObject(terms, termName, child);
      }
      else if (Node.Type.isIntegerFraction(child)) {
        terms = Util.appendToArrayInObject(terms, CONSTANT_FRACTION, child);
      }
      else if (Node.Type.isConstant(child)) {
        terms = Util.appendToArrayInObject(terms, CONSTANT, child);
      }
      else if (Node.Type.isOperator(node) ||
               Node.Type.isFunction(node) ||
               Node.Type.isParenthesis(node) ||
               Node.Type.isUnaryMinus(node)) {
        terms = Util.appendToArrayInObject(terms, OTHER, child);
      }
      else {
        // Note that we shouldn't get any symbol nodes in the switch statement
        // since they would have been handled by isPolynomialTerm
        throw Error('Unsupported node type: ' + child.type);
      }
    }
    // If there's exactly one constant and one fraction, we collect them
    // to add them together.
    // e.g. 2 + 1/3 + 5 would collect the constants (2+5) + 1/3
    // but 2 + 1/3 + x would collect (2 + 1/3) + x so we can add them together
    if (terms[CONSTANT] && terms[CONSTANT].length === 1 &&
       terms[CONSTANT_FRACTION] && terms[CONSTANT_FRACTION].length === 1) {
      const fraction = terms[CONSTANT_FRACTION][0];
      terms = Util.appendToArrayInObject(terms, CONSTANT, fraction);
      delete terms[CONSTANT_FRACTION];
    }
  
    return terms;
  }
docs: Collects like terms in an addition expression tree into categories. Returns a dictionary of termname to lists of nodes with that name e.g. 2x + 4 + 5x would return {'x': [2x, 5x], CONSTANT: [4]} (where 2x, 5x, and 4 would actually be expression trees)