code: def _roundtrip(self, tmp_path, mode, epsilon, args={}):
      temp_file = str(tmp_path / "temp.webp")
  
      hopper(mode).save(temp_file, **args)
      with Image.open(temp_file) as image:
          assert image.mode == self.rgb_mode
          assert image.size == (128, 128)
          assert image.format == "WEBP"
          image.load()
          image.getdata()
  
          if mode == self.rgb_mode:
              # generated with: dwebp -ppm temp.webp -o hopper_webp_write.ppm
              assert_image_similar_tofile(
                  image, "Tests/images/hopper_webp_write.ppm", 12.0
              )
  
          # This test asserts that the images are similar. If the average pixel
          # difference between the two images is less than the epsilon value,
          # then we're going to accept that it's a reasonable lossy version of
          # the image.
          target = hopper(mode)
          if mode != self.rgb_mode:
              target = target.convert(self.rgb_mode)
          assert_image_similar(image, target, epsilon)
  
imports: import io
  import re
  import sys
  import pytest
  from PIL import Image, WebPImagePlugin, features
  from .helper import assert_image_similar, assert_image_similar_tofile, hopper, skip_unless_feature
label_desc: Use image node_id 4 for calling the TestFileWebp obj's underlying member method code with example usage: obj._roundtrip(tmp_path, mode, epsilon, args) without return types