code: def CreateProductPartition(client, adgroup_id):
    
    ad_group_criterion_service = client.GetService('AdGroupCriterionService',
                                                   'v201809')
    helper = ProductPartitionHelper(adgroup_id)
    root = helper.CreateSubdivision()
  
    new_product_canonical_condition = {
        'xsi_type': 'ProductCanonicalCondition',
        'condition': 'NEW'
    }
  
    used_product_canonical_condition = {
        'xsi_type': 'ProductCanonicalCondition',
        'condition': 'USED'
    }
  
    other_product_canonical_condition = {
        'xsi_type': 'ProductCanonicalCondition',
    }
  
    helper.CreateUnit(root, new_product_canonical_condition)
    helper.CreateUnit(root, used_product_canonical_condition)
    helper.CreateUnit(root, other_product_canonical_condition)
  
    result = ad_group_criterion_service.mutate(helper.operations)
    return result['value']
docs: Creates a ProductPartition tree for the given AdGroup ID.
  
    Args:
      client: an AdWordsClient instance.
      adgroup_id: a str AdGroup ID.
  
    Returns:
      The ProductPartition tree as a sudsobject.