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: Ensures the tasks are stored as a list. Even if there is only a single task.
docstr_tok: ["Ensures","the","tasks","are","stored","as","a","list",".","Even","if","there","is","only","a","single","task","."]
code: def tasks(
      self, task_or_tasks: Union[Collection[MonitorTask], MonitorTask]
  ) -> None:
      """Ensures the tasks are stored as a list. Even if there is only a single task."""
      if isinstance(task_or_tasks, MonitorTask):
          self._tasks = [task_or_tasks]
      else:
          assert isinstance(task_or_tasks, Collection)
          self._tasks = list(task_or_tasks)
  
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 3 for calling the MonitorTaskGroup obj's underlying member method code with example usage: obj.tasks(task_or_tasks) without return types