code: def test_roundtrip(mode):
      im = HOPPER[mode]
  
      def transpose(first, second):
          return im.transpose(first).transpose(second)
  
      assert_image_equal(
          im,
          transpose(
              Transpose.FLIP_LEFT_RIGHT, Transpose.FLIP_LEFT_RIGHT
          ),
      )
      assert_image_equal(
          im,
          transpose(
              Transpose.FLIP_TOP_BOTTOM, Transpose.FLIP_TOP_BOTTOM
          ),
      )
      assert_image_equal(
          im, transpose(Transpose.ROTATE_90, Transpose.ROTATE_270)
      )
      assert_image_equal(
          im, transpose(Transpose.ROTATE_180, Transpose.ROTATE_180)
      )
      assert_image_equal(
          im.transpose(Transpose.TRANSPOSE),
          transpose(Transpose.ROTATE_90, Transpose.FLIP_TOP_BOTTOM),
      )
      assert_image_equal(
          im.transpose(Transpose.TRANSPOSE),
          transpose(Transpose.ROTATE_270, Transpose.FLIP_LEFT_RIGHT),
      )
      assert_image_equal(
          im.transpose(Transpose.TRANSVERSE),
          transpose(Transpose.ROTATE_90, Transpose.FLIP_LEFT_RIGHT),
      )
      assert_image_equal(
          im.transpose(Transpose.TRANSVERSE),
          transpose(Transpose.ROTATE_270, Transpose.FLIP_TOP_BOTTOM),
      )
      assert_image_equal(
          im.transpose(Transpose.TRANSVERSE),
          transpose(Transpose.ROTATE_180, Transpose.TRANSPOSE),
      )
  
file_path: pillow/Tests/test_image_transpose.py
imports: from __future__ import annotations
  import pytest
  from PIL.Image import Transpose
  from .None import helper
  from .helper import assert_image_equal
label_desc: Use image node_id 8 for calling a global function with example usage: test_roundtrip(mode) and returns: im