code: def shutdown(self):
      self._closed = True
      for task in self.tasks:
          try:
              task.cancel()
          except Exception:
              log.warning(
                  f"encountered an exception while cancelling background task: {task}",
                  exc_info=True,
              )
  
file_path: hail/hail/python/hailtop/aiotools/tasks.py
imports: from typing import Callable, Set
  import asyncio
  import logging
label_desc: Use image node_id 4 for calling the BackgroundTaskManager obj's underlying member method code with example usage: obj.shutdown() without return types