metawards.iterators.iterate_custom¶
-
metawards.iterators.
iterate_custom
(custom_function: Callable[[…], None], stage: str, **kwargs) → List[Callable[[…], None]][source]¶ This returns the default list of ‘advance_XXX’ functions that are called in sequence for each iteration of the model run. This iterator provides a custom iterator that uses ‘custom_function’ passed from the user. This iterator makes sure that if ‘stage’ is not handled by the custom function, then the “iterate_default” functions for that stage are correctly called for all stages except “infect”
- Parameters
custom_function (MetaFunction) – A custom user-supplied function that returns the functions that the user would like to be called for each step.
stage (str) – The stage of the day/model
- Returns
funcs – The list of functions that will be called in sequence
- Return type
List[MetaFunction]