+ def get_descendants(self, db_conn: DatabaseConnection) ->\
+ list[dict[str, object]]:
+ """Return tree of descendant Processes"""
+ descendants = []
+ for id_ in self.child_ids:
+ child = self.__class__.by_id(db_conn, id_)
+ descendants += [{'process': child,
+ 'children': child.get_descendants(db_conn)}]
+ return descendants
+