code: static AdGroupCriterion createCriterionForSetBiddableUnit(
        ProductPartitionNode node, long adGroupId, BiddingStrategyConfiguration biddingConfig) {
      Preconditions.checkNotNull(node, "Null node");
      Preconditions.checkNotNull(biddingConfig, "Null bidding configuration");
      Preconditions.checkArgument(node.isBiddableUnit(), "Node is not a biddable unit");
  
      BiddableAdGroupCriterion biddableCriterion = new BiddableAdGroupCriterion();
      biddableCriterion.setAdGroupId(adGroupId);
  
      ProductPartition partition = new ProductPartition();
      partition.setId(node.getProductPartitionId());
      if (node.getParent() != null) {
        partition.setParentCriterionId(node.getParent().getProductPartitionId());
      }
      partition.setCaseValue(node.getDimension());
      partition.setPartitionType(ProductPartitionType.UNIT);
  
      biddableCriterion.setCriterion(partition);
  
      // Set the bidding attributes on the new ad group criterion.
      if (node.getBid() != null) {
        Money bidMoney = new Money();
        bidMoney.setMicroAmount(node.getBid());
        CpcBid cpcBid = new CpcBid();
        cpcBid.setBid(bidMoney);
        biddingConfig.setBids(new Bids[] {cpcBid});
      } else {
        biddingConfig.setBids(new Bids[0]);
      }
      biddableCriterion.setBiddingStrategyConfiguration(biddingConfig);
  
      // Set the upgraded URL attributes on the new ad group criterion.
      if (node.getTrackingUrlTemplate() != null) {
        biddableCriterion.setTrackingUrlTemplate(
            node.getTrackingUrlTemplate());
      }
      biddableCriterion.setUrlCustomParameters(createCustomParameters(node));
      return biddableCriterion;
    }
docs: Returns a new AdGroupCriterion configured for a SET operation that will set the criterion's
  bid, tracking template, and custom parameters.
  
  @param node the node whose criterion should be updated
  @param adGroupId the ad group ID of the criterion
  @param biddingConfig the bidding strategy configuration of the criterion