code: def _get_resolution(page: tifffile.TiffPage) -> Dict[str, Any]:
      metadata = {}
  
      try:
          metadata["resolution_unit"] = page.tags[296].value.value
      except KeyError:
          # tag 296 missing
          return metadata
  
      try:
          resolution_x = page.tags[282].value
          resolution_y = page.tags[283].value
  
          metadata["resolution"] = (
              resolution_x[0] / resolution_x[1],
              resolution_y[0] / resolution_y[1],
          )
      except KeyError:
          # tag 282 or 283 missing
          pass
      except ZeroDivisionError:
          warnings.warn(
              "Ignoring resolution metadata because at least one direction has a 0 "
              "denominator.",
              RuntimeWarning,
          )
  
      return metadata
  
file_path: imageio/imageio/plugins/tifffile_v3.py
imports: from io import BytesIO
  from typing import Any, Dict, Optional, cast
  import warnings
  import numpy
  import tifffile
  from ..core.request import URI_BYTES, InitializationError, Request
  from ..core.v3_plugin_api import ImageProperties, PluginV3
  from ..typing import ArrayLike
label_desc: Use image node_id 1 for calling a global function with example usage: _get_resolution(page) and returns: metadata, metadata