code: def _gm_matches(gmapping, expected):
      """Assert that all keys in ``expected`` match the values in ``gmapping``."""
      for attr_key, attr_val in expected.attrs.items():
          test_val = gmapping.attrs[attr_key]
          if attr_val is None or isinstance(attr_val, str):
              assert test_val == attr_val
          else:
              np.testing.assert_almost_equal(
                  test_val, attr_val, decimal=3
              )
  
file_path: satpy/satpy/tests/cf_tests/test_area.py
imports: import dask.array
  import numpy
  import pytest
  import xarray
  from pyresample import AreaDefinition, SwathDefinition
  from satpy.cf.area import _add_grid_mapping, area2cf
label_desc: Use image node_id 2 for calling a global function with example usage: _gm_matches(gmapping, expected) without return types