docs: def _write_header(self):
          """Builds the message header and writes it to the output stream."""
          self.output_buffer += serialize_header(header=self._header, signer=self.signer)
          self.output_buffer += serialize_header_auth(
              algorithm=self._encryption_materials.algorithm,
              header=self.output_buffer,
              data_encryption_key=self._derived_data_key,
              signer=self.signer,
          )