code: def setUp(self) -> None:
      self.loss = TextSnakeModuleLoss()
  
      self.data_samples = [
          TextDetDataSample(
              metainfo=dict(img_shape=(3, 10)),
              gt_instances=InstanceData(
                  polygons=np.array(
                      [
                          [0, 0, 1, 0, 1, 1, 0, 1],
                          [2, 0, 3, 0, 3, 1, 2, 1],
                      ],
                      dtype=np.float32,
                  ),
                  ignored=torch.BoolTensor([False, False]),
              ),
          )
      ]
      self.preds = torch.rand((1, 5, 3, 10))
  
file_path: mmocr/tests/test_models/test_textdet/test_module_losses/test_textsnake_module_loss.py
imports: from unittest import TestCase
  import numpy
  import torch
  from mmengine.structures import InstanceData
  from mmocr.models.textdet.module_losses import TextSnakeModuleLoss
  from mmocr.structures import TextDetDataSample
label_desc: Use image node_id 1 for calling the TestTextSnakeModuleLoss obj's underlying member method code with example usage: obj.setUp() without return types