Issue
The arguments are typed as
entities: dict[str, EntityModel],
edges: dict[str, EdgeModel | tuple[EdgeModel, list[EntityEdgeSourceTarget]]] | None
I.e. it states that the dict values are expected to contain instances of EntityModel and EdgeModel. However, the method also supports receiving types (not instances), and that's how it is used in the documentation and examples. This means that using it as documented results in type checker erros.
Expected
The type annotations should be
entities: dict[str, EntityModel | type[EntityModel],
edges: dict[str, EdgeModel | type[EdgeModel] | tuple[EdgeModel | type[EdgeModel], list[EntityEdgeSourceTarget]]] | None,