code: def test_deleter(self):
      gt_instances_data = dict(
          bboxes=torch.rand(4, 4),
          labels=torch.rand(4),
          masks=np.random.rand(4, 2, 2),
      )
  
      det_data_sample = DetDataSample()
      gt_instances = InstanceData(data=gt_instances_data)
      det_data_sample.gt_instances = gt_instances
      assert "gt_instances" in det_data_sample
      del det_data_sample.gt_instances
      assert "gt_instances" not in det_data_sample
  
      pred_panoptic_seg_data = torch.rand(5, 4)
      pred_panoptic_seg = PixelData(data=pred_panoptic_seg_data)
      det_data_sample.pred_panoptic_seg = pred_panoptic_seg
      assert "pred_panoptic_seg" in det_data_sample
      del det_data_sample.pred_panoptic_seg
      assert "pred_panoptic_seg" not in det_data_sample
  
      pred_segm_seg_data = dict(segm_seg=torch.rand(5, 4, 2))
      pred_segm_seg = PixelData(**pred_segm_seg_data)
      det_data_sample.pred_segm_seg = pred_segm_seg
      assert "pred_segm_seg" in det_data_sample
      del det_data_sample.pred_segm_seg
      assert "pred_segm_seg" not in det_data_sample
  
file_path: mmdetection/tests/test_structures/test_det_data_sample.py
imports: from unittest import TestCase
  import numpy
  import pytest
  import torch
  from mmengine.structures import InstanceData, PixelData
  from mmdet.structures import DetDataSample
label_desc: Use image node_id 3 for calling the TestDetDataSample obj's underlying member method code with example usage: obj.test_deleter() without return types