docs: def add_child(
          self,
          parent,
          title="",
          level="",
          start_date="",
          end_date="",
          date_expression="",
          notes=[],
      ):
          """
          Adds a new resource component parented within `parent`.
  
          :param str parent: The ID to a resource or a resource component.
          :param str title: A title for the record.
          :param str level: The level of description.
  
          :return: The ID of the newly-created record.
          """
          parent_record = self.get_record(parent)
          record_type = self.resource_type(parent)
          repository = parent_record["repository"]["ref"]
  
          if record_type == "resource":
              resource = parent
          else:
              resource = parent_record["resource"]["ref"]
  
          new_object = {
              "title": title,
              "level": level,
              "jsonmodel_type": "archival_object",
              "resource": {"ref": resource},
          }
  
          # Create dates object if any of the date fields is populated
          if date_expression or start_date or end_date:
              date = {
                  "jsonmodel_type": "date",
                  "date_type": "inclusive",
                  "label": "creation",
              }
              if date_expression:
                  date["expression"] = date_expression
              if start_date:
                  date["begin"] = start_date
              if end_date:
                  date["end"] = end_date
  
              new_object["dates"] = [date]
  
          new_object["notes"] = []
          for note in notes:
              note_type = note.get("type", "odd")
              # If there is a note, but it's an empty string, skip this;
              # ArchivesSpace doesn't allow subnote content to be empty.
              content = note.get("content")
              if not content:
                  continue
              new_note = {
                  "jsonmodel_type": "note_multipart",
                  "publish": True,
                  "subnotes": [
                      {"content": content, "jsonmodel_type": "note_text", "publish": True}
                  ],
                  "type": note_type,
              }
              new_object["notes"].append(new_note)
  
          # "parent" always refers to an archival_object instance; if this is rooted
          # directly to a resource, leave it out.
          if record_type == "resource_component":
              new_object["parent"] = {"ref": parent}
  
          return self._post(
              repository + "/archival_objects", data=json.dumps(new_object)
          ).json()["uri"]