code: def test_masked_correct_predictions():
      preds = torch.tensor(
          [
              [1, 5, 1, 5, 1, 5, 12, 12, 12],
              [10, 1, 5, 1, 5, 12, 12, 12, 12],
          ]
      )
      targets = torch.tensor(
          [[1, 9, 5, 7, 5, 9, 13, 6, 0], [1, 9, 7, 13, 4, 7, 7, 7, 0]]
      )
      targets_sequence_length = torch.tensor([8, 8])
  
      result = metric_utils.masked_correct_predictions(
          targets, preds, targets_sequence_length
      )
  
      assert torch.equal(
          result,
          torch.Tensor(
              [
                  1.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
              ]
          ),
      )
  
file_path: ludwig/tests/ludwig/utils/test_metric_utils.py
imports: from collections import OrderedDict
  import torch
  from ludwig.utils import metric_utils
  from ludwig.utils.metric_utils import TrainerMetric
label_desc: Use image node_id 3 for calling a global function with example usage: test_masked_correct_predictions() without return types