code: def test_for_correctness(
      left: str,
      right: str,
      substitution_cost: int,
      expected,
  ):
      """Test the underlying implementation of edit distance.
  
      Test cases taken from:
      https://github.com/nltk/nltk/blob/develop/nltk/test/unit/test_distance.py
  
      """
      for s1, s2 in ((left, right), (right, left)):
          predicted = edit_distance(
              s1,
              s2,
              substitution_cost=substitution_cost,
          )
          assert predicted == expected
  
file_path: torchmetrics/tests/unittests/text/test_edit.py
imports: from functools import partial
  import pytest
  from nltk.metrics.distance import edit_distance
  from torchmetrics.functional.text.edit import edit_distance
  from torchmetrics.text.edit import EditDistance
  from unittests.text.helpers import TextTester
  from unittests.text.inputs import _inputs_single_reference
label_desc: Use image node_id 1 for calling a global function with example usage: test_for_correctness(left, right, substitution_cost, expected) without return types