code: def test_with_transpositions(
      self,
      left: str,
      right: str,
      substitution_cost: int,
      expecteds: Tuple[int, int],
  ):
      """
      Test `edit_distance` between two strings, given some `substitution_cost`,
      and whether transpositions are allowed.
  
      :param str left: First input string to `edit_distance`.
      :param str right: Second input string to `edit_distance`.
      :param int substitution_cost: The cost of a substitution action in `edit_distance`.
      :param Tuple[int, int] expecteds: A tuple of expected outputs, such that `expecteds[0]` is
          the expected output with `transpositions=True`, and `expecteds[1]` is
          the expected output with `transpositions=False`.
      """
      # Test the input strings in both orderings
      for s1, s2 in ((left, right), (right, left)):
          # zip with [True, False] to get the transpositions value
          for expected, transpositions in zip(expecteds, [True, False]):
              predicted = edit_distance(
                  s1,
                  s2,
                  substitution_cost=substitution_cost,
                  transpositions=transpositions,
              )
              assert predicted == expected
  
imports: from typing import Tuple
  import pytest
  from nltk.metrics.distance import edit_distance
label_desc: Use image node_id 1 for calling the TestEditDistance obj's underlying member method code with example usage: obj.test_with_transpositions(left, right, substitution_cost, expecteds) without return types