code: def test_deleted_record(self):
      for should_delete, should_create in [
          (True, True),
          (True, False),
          (False, True),
      ]:
          self.setUp()
          with self.subTest(
              should_delete=should_delete, should_create=should_create
          ):
              self.assert_good_kernel_launch(
                  stream_id(1), read_only=[tensor_id(1)]
              )
              self.handler._handle_event_record(
                  event_id(0), stream_id(1)
              )
  
              if should_delete:
                  self.handler._handle_event_deletion(event_id(0))
              if should_create:
                  self.handler._handle_event_creation(event_id(0))
  
              self.handler._handle_event_wait(event_id(0), stream_id(2))
              self.assert_bad_kernel_launch(
                  1, stream_id(2), read_write=[tensor_id(1)]
              )
  
imports: import sys
  import textwrap
  import traceback
  from typing import List
  import torch
  import torch.cuda._sanitizer
  from torch.cuda._sanitizer import StreamId, DataPtr, EventId
  from torch.testing._internal.common_utils import TestCase, run_tests, NoTest, TEST_CUDA
label_desc: Use image node_id 13 for calling the TestEventHandler obj's underlying member method code with example usage: obj.test_deleted_record() without return types