- qspec.models. find_model ( model , sub_model )[source]
-
Find the first submodel of a given type. For
Listedmodels, only the first branch is searched.- Parameters:
-
- model_base.Model | None
The model to search in.
- sub_modeltype[T]
The type of the submodel to find.
- Returns:
-
- subT | None
The first submodel of type
sub_model. Ifmodelalready has the typesub_model,modelis returned. ReturnsNoneifmodelhas no submodel of typesub_model.