code: def add_agent(self, *args, **kwargs):
          
          el_metsHdr = self._tree.getroot().find('.//mets:metsHdr', NS)
          if el_metsHdr is None:
              el_metsHdr = ET.Element(TAG_METS_METSHDR)
              self._tree.getroot().insert(0, el_metsHdr)
          #  assert(el_metsHdr is not None)
          el_agent = ET.SubElement(el_metsHdr, TAG_METS_AGENT)
          #  print(ET.tostring(el_metsHdr))
          return OcrdAgent(el_agent, *args, **kwargs)
docs: Add an `OcrdAgent </../../ocrd_models/ocrd_models.ocrd_agent.html>`_ to the list of agents in the metsHdr.