code: def test_resolution_metadata(tmp_path, dpi, expected_resolution):
      data = np.zeros((200, 100), dtype=np.uint8)
  
      writer = iio.get_writer(tmp_path / "test.tif")
      writer.append_data(data, dict(resolution=dpi))
      writer.close()
  
      read_image = iio.imread(tmp_path / "test.tif")
  
      assert read_image.meta["resolution"] == expected_resolution
      assert read_image.meta["resolution_unit"] == 2
  
imports: import datetime
  import io
  import warnings
  from copy import deepcopy
  import numpy
  import pytest
  from conftest import deprecated_test
  import imageio.v2
  import imageio.v3
  from imageio.config import known_extensions, known_plugins
label_desc: Use image node_id 5 for calling a global function with example usage: test_resolution_metadata(tmp_path, dpi, expected_resolution) without return types