class_docstr: Class for grouping `MonitorTask` instances. A group defines
  all the tasks that are run at the same frequency, given by `period`.
  
  A `MonitorTaskGroup` can exist of a single instance or a list of
  `MonitorTask` instances.
class_docstr_tok: ["Class","for","grouping","`","MonitorTask","`","instances",".","A","group","defines","all","the","tasks","that","are","run","at","the","same","frequency",",","given","by","`","period","`",".","A","`","MonitorTaskGroup","`","can","exist","of","a","single","instance","or","a","list","of","`","MonitorTask","`","instances","."]
docstr: :param task_or_tasks: a single instance or a list of `MonitorTask` instances.
      Each `MonitorTask` in the list will be run with the given `period`.
  :param period: defines how often to run the tasks; they will execute every `period`th step.
      For large values of `period` the tasks will be less frequently run. Defaults to
      running at every step (`period = 1`).
docstr_tok: [":","param","task_or_tasks",":","a","single","instance","or","a","list","of","`","MonitorTask","`","instances",".","Each","`","MonitorTask","`","in","the","list","will","be","run","with","the","given","`","period","`",".",":","param","period",":","defines","how","often","to","run","the","tasks",";","they","will","execute","every","`","period","`","th","step",".","For","large","values","of","`","period","`","the","tasks","will","be","less","frequently","run",".","Defaults","to","running","at","every","step","(","`","period","=","1","`",")","."]
code: def __init__(
      self,
      task_or_tasks: Union[Collection[MonitorTask], MonitorTask],
      period: int = 1,
  ) -> None:
      """
      :param task_or_tasks: a single instance or a list of `MonitorTask` instances.
          Each `MonitorTask` in the list will be run with the given `period`.
      :param period: defines how often to run the tasks; they will execute every `period`th step.
          For large values of `period` the tasks will be less frequently run. Defaults to
          running at every step (`period = 1`).
      """
      self._tasks: Collection[MonitorTask] = []
      self.tasks = task_or_tasks  # type: ignore[assignment]
      self._period = period
  
file_path: GPflow/gpflow/monitor/base.py
imports: from abc import ABC, abstractmethod
  from typing import Any, Callable, Collection, Union
  import tensorflow
label_desc: Use image node_id 1 to create a new MonitorTaskGroup object  with example: obj = MonitorTaskGroup(task_or_tasks, period)