code: private ImmutableMap<String, Expression> getStaticAttributes(HtmlOpenTagNode node) {
      List<HtmlAttributeNode> nodesToRemove = new ArrayList<>();
      ImmutableMap.Builder<String, Expression> builder = ImmutableMap.builder();
      // The 0th index is actually the tag itself, so we don't need to iterate over it.
      for (int i = 1; i < node.numChildren(); i++) {
        if (node.getChild(i) instanceof HtmlAttributeNode) {
          HtmlAttributeNode attrNode = (HtmlAttributeNode) node.getChild(i);
          String attributeKey = attrNode.getStaticKey();
          Expression value = getStaticContent(attrNode);
          if (attributeKey != null && value != null) {
            nodesToRemove.add(attrNode);
            builder.put(attributeKey, value);
          }
        }
      }
  
      for (HtmlAttributeNode child : nodesToRemove) {
        node.removeChild(child);
      }
      return builder.build();
    }
docs: Removes static children from {@code node} and returns them in a map of key to value. For
  attribute nodes that are known to be static, we can improve performance by adding them to the
  statics array(http://google.github.io/incremental-dom/#statics-array).