docs: def parse_doc(obj: dict) -> BioCDocument:
      """Deserialize a dict obj to a BioCDocument object"""
      doc = BioCDocument()
      doc.id = obj['id']
      doc.infons = obj['infons']
      for passage in obj['passages']:
          doc.add_passage(parse_passage(passage))
      for annotation in obj['annotations']:
          doc.add_annotation(parse_annotation(annotation))
      for relation in obj['relations']:
          doc.add_relation(parse_relation(relation))
      return doc