code: def CreateUnit(self, parent=None, value=None, bid_amount=None):
      
      unit = {
          'xsi_type': 'ProductPartition',
          'partitionType': 'UNIT'
      }
  
      # The root node has neither a parent nor a value.
      if parent is not None:
        unit['parentCriterionId'] = parent['id']
        unit['caseValue'] = value
  
      if bid_amount is not None and bid_amount > 0:
        # Note: Showcase ads require that the campaign has a ManualCpc
        # BiddingStrategyConfiguration.
        bidding_strategy_configuration = {
            'bids': [{
                'xsi_type': 'CpcBid',
                'bid': {
                    'xsi_type': 'Money',
                    'microAmount': str(bid_amount)
                }
            }]
        }
  
        adgroup_criterion = {
            'xsi_type': 'BiddableAdGroupCriterion',
            'biddingStrategyConfiguration': bidding_strategy_configuration
        }
      else:
        adgroup_criterion = {
            'xsi_type': 'NegativeAdGroupCriterion'
        }
  
      adgroup_criterion['adGroupId'] = self.adgroup_id
      adgroup_criterion['criterion'] = unit
  
      self.CreateAddOperation(adgroup_criterion)
  
      return unit
docs: Creates a unit node.
  
      Args:
        parent: The node that should be this node's parent.
        value: The value being partitioned on.
        bid_amount: The amount to bid for matching products, in micros.
      Returns:
        A new unit node.