code: function addToTermsforPolynomialMultiplication(terms, node) {
    const polyNode = new Node.PolynomialTerm(node);
    let termName;
  
    if (!polyNode.hasCoeff()) {
      termName = getTermName(node, '*');
      terms = Util.appendToArrayInObject(terms, termName, node);
    }
    else {
      const coefficient = polyNode.getCoeffNode();
      let termWithoutCoefficient = polyNode.getSymbolNode();
      if (polyNode.getExponentNode()) {
        termWithoutCoefficient = Node.Creator.operator(
          '^', [termWithoutCoefficient, polyNode.getExponentNode()]);
      }
  
      terms = Util.appendToArrayInObject(terms, CONSTANT, coefficient);
      termName = getTermName(termWithoutCoefficient, '*');
      terms = Util.appendToArrayInObject(terms, termName, termWithoutCoefficient);
    }
    return terms;
  }
docs: A helper function for getTermsForCollectingMultiplication Polynomial terms need to be divided into their coefficient + symbolic parts. e.g. 2x^4 -> 2 (coeffient) and x^4 (symbolic, named after the symbol node) Takes the terms list and the polynomial term node, and returns an updated terms list.