code: def __init__(self, app):
      self.app = app
      self.cancel_ready_state_changed: asyncio.Event = app[
          "cancel_ready_state_changed"
      ]
      self.cancel_creating_state_changed: asyncio.Event = app[
          "cancel_creating_state_changed"
      ]
      self.cancel_running_state_changed: asyncio.Event = app[
          "cancel_running_state_changed"
      ]
      self.db: Database = app["db"]
      self.async_worker_pool: AsyncWorkerPool = self.app[
          "async_worker_pool"
      ]
      self.inst_coll_manager: InstanceCollectionManager = app[
          "driver"
      ].inst_coll_manager
  
      self.task_manager = aiotools.BackgroundTaskManager()
  
file_path: hail/batch/batch/driver/canceller.py
imports: import asyncio
  import logging
  from typing import Any, AsyncIterator, Dict
  from gear import Database
  from hailtop import aiotools
  from hailtop.utils import AsyncWorkerPool, WaitableSharedPool, periodically_call, retry_long_running, run_if_changed, time_msecs
  from ..utils import Box
  from .instance_collection import InstanceCollectionManager
  from .job import mark_job_complete, unschedule_job
label_desc: Use image node_id 1 to create a new Canceller object  with example: obj = Canceller(app)