docs: def build(self, builder):
          """
          Build XML by appending to builder
          """
          params = {}
  
          # Add in the transaction type
          if self.transaction_type is not None:
              params["TransactionType"] = self.transaction_type
  
          if self.seqnum is None:
              # SeqNum is not optional (and defaulted)
              raise ValueError("SeqNum is not set.")  # pragma: no cover
          params["SeqNum"] = str(self.seqnum)
  
          if self.annotation_id is not None:
              # If an Annotation is contained with an Annotations element,
              # the ID attribute is required.
              params["ID"] = self.annotation_id
  
          builder.start("Annotation", params)
  
          if self.flags in (None, []):
              raise ValueError('Flag is not set.')
  
          # populate the flags
          for flag in self.flags:
              flag.build(builder)
  
          # add the Comment, if it exists
          if self.comment is not None:
              self.comment.build(builder)
  
          builder.end("Annotation")