code: def test_exif(self, tmp_path):
      def check_exif(exif):
          assert sorted(exif.keys()) == [
              256,
              257,
              258,
              259,
              262,
              271,
              272,
              273,
              277,
              278,
              279,
              282,
              283,
              284,
              296,
              297,
              305,
              339,
              700,
              34665,
              34853,
              50735,
          ]
          assert exif[256] == 640
          assert exif[271] == "FLIR"
  
          gps = exif.get_ifd(0x8825)
          assert list(gps.keys()) == [0, 1, 2, 3, 4, 5, 6, 18]
          assert gps[0] == b"\x03\x02\x00\x00"
          assert gps[18] == "WGS-84"
  
      outfile = str(tmp_path / "temp.tif")
      with Image.open("Tests/images/ifd_tag_type.tiff") as im:
          exif = im.getexif()
          check_exif(exif)
  
          im.save(outfile, exif=exif)
  
      outfile2 = str(tmp_path / "temp2.tif")
      with Image.open(outfile) as im:
          exif = im.getexif()
          check_exif(exif)
  
          im.save(outfile2, exif=exif.tobytes())
  
      with Image.open(outfile2) as im:
          exif = im.getexif()
          check_exif(exif)
  
imports: import os
  from io import BytesIO
  import pytest
  from PIL import Image, ImageFile, TiffImagePlugin
  from PIL.TiffImagePlugin import RESOLUTION_UNIT, X_RESOLUTION, Y_RESOLUTION
  from .helper import assert_image_equal, assert_image_equal_tofile, assert_image_similar, assert_image_similar_tofile, hopper, is_pypy, is_win32
label_desc: Use image node_id 37 for calling the TestFileTiff obj's underlying member method code with example usage: obj.test_exif(tmp_path) without return types