code: static ProductPartitionNode copyProperties(ProductPartitionNode fromNode,
        ProductPartitionNode toNode) {
      switch (fromNode.nodeState.getNodeType()) {
        case BIDDABLE_UNIT:
          toNode = toNode.asBiddableUnit();
          toNode.setBid(fromNode.getBid());
          toNode.setTrackingUrlTemplate(fromNode.getTrackingUrlTemplate());
          // Clone the CustomParameters from fromNode so that changes on the toNode won't be
          // reflected in the fromNode.
          for (Entry<String, String> customParamEntry :
              fromNode.nodeState.getCustomParams().entrySet()) {
            toNode.putCustomParameter(customParamEntry.getKey(), customParamEntry.getValue());
          }
          break;
        case EXCLUDED_UNIT:
          toNode = toNode.asExcludedUnit();
          break;
        case SUBDIVISION:
          toNode = toNode.asSubdivision();
          break;
        default:
          throw new IllegalStateException(
              "Unrecognized node state: " + fromNode.nodeState.getNodeType());
      }
  
      return toNode.setProductPartitionId(fromNode.getProductPartitionId());
    }
docs: Performs a <em>shallow</em> copy of properties from {@code fromNode} to {@code toNode}. Does
  <em>not</em> change the parent node of {@code toNode}.
  
  @param fromNode the node to copy from.
  @param toNode the node to copy to.
  @return {@code toNode}, with its properties updated.