- qspec.models. find_models ( model , sub_model , model_list=None )[source]
-
Find the first submodel of a given type in every branch of a model. The branches are the submodels of
Listedmodels.- Parameters:
-
- model_base.Model | None
The model to search in.
- sub_modeltype[T]
The type of the submodels to find.
- model_listIterable[T] | None
A list of models to append the found submodels to.
- Returns:
-
- subslist[T]
The first submodels of type
sub_modelof every branch inmodel, appended tomodel_list. Branches without a submodel of typesub_modelare skipped.