code: def test_forward(self, mock_forward):
      def mock_forward(feat, out_enc, datasamples):
          return True
  
      mock_forward.side_effect = mock_forward
      cfg = dict(type="FakeModule")
      decoder = BaseTextDetHead(cfg, cfg)
      # test loss
      loss = decoder.loss(None, None)
      self.assertIsNone(loss)
  
      # test predict
      predict = decoder.predict(None, None)
      self.assertIsNone(predict)
  
      # test forward
      tensor = decoder(None, None)
      self.assertTrue(tensor)
  
      loss, predict = decoder.loss_and_predict(None, None)
      self.assertIsNone(loss)
      self.assertIsNone(predict)
  
file_path: mmocr/tests/test_models/test_textdet/test_heads/test_base_head.py
imports: from unittest import TestCase, mock
  from mmocr.models.textdet import BaseTextDetHead
  from mmocr.registry import MODELS
label_desc: Use image node_id 2 for calling the TestBaseTextDetHead obj's underlying member method code with example usage: obj.test_forward(mock_forward) and returns: True