docs: def build(self, builder, formname=None):
          """Build XML by appending to builder"""
  
          params = dict(ItemGroupOID=formname if formname else self.itemgroupoid)
  
          if self.transaction_type is not None:
              params["TransactionType"] = self.transaction_type
  
          if self.item_group_repeat_key is not None:
              params["ItemGroupRepeatKey"] = str(
                  self.item_group_repeat_key)  # may be @context for transaction type upsert or context
  
          params["mdsol:Submission"] = "WholeItemGroup" if self.whole_item_group else "SpecifiedItemsOnly"
  
          # mixins
          self.mixin()
          self.mixin_params(params)
  
          builder.start("ItemGroupData", params)
  
          # Ask children
          for item in self.items.values():
              item.build(builder)
  
          # Add annotations
          for annotation in self.annotations:
              annotation.build(builder)
  
          # Add the signature if it exists
          if self.signature is not None:
              self.signature.build(builder)
          builder.end("ItemGroupData")