code: def test_calc_res():
      """Assert that resolution is calculated correctly when using the xarray
      rasterio backend.
      """
      import rasterio
  
      with open_rasterio(TEST_RASTER_PATH) as src:
          xr_res = ds.utils.calc_res(src)
      with rasterio.open(TEST_RASTER_PATH) as src:
          rio_res = src.res
      assert np.allclose(xr_res, rio_res)
  
imports: from __future__ import annotations
  import pytest
  from dask.context import config
  from os import path
  from itertools import product
  import datashader
  import xarray
  import numpy
  import dask.array
  import pandas
  from datashader.resampling import compute_chunksize
  import datashader.transfer_functions
  from packaging.version import Version
label_desc: Use image node_id 11 for calling a global function with example usage: test_calc_res() without return types