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),
      )
  
      e2e_data_sample = TextSpottingDataSample()
      gt_instances = InstanceData(data=gt_instances_data)
      e2e_data_sample.gt_instances = gt_instances
      assert "gt_instances" in e2e_data_sample
      del e2e_data_sample.gt_instances
      assert "gt_instances" not in e2e_data_sample
  
      e2e_data_sample.pred_instances = gt_instances
      assert "pred_instances" in e2e_data_sample
      del e2e_data_sample.pred_instances
      assert "pred_instances" not in e2e_data_sample
  
file_path: mmocr/tests/test_structures/test_textspotting_data_sample.py
imports: from unittest import TestCase
  import numpy
  import torch
  from mmengine.structures import InstanceData
  from mmocr.structures import TextSpottingDataSample
label_desc: Use image node_id 4 for calling the TestTextSpottingDataSample obj's underlying member method code with example usage: obj.test_deleter() without return types