code: def _add_grid_mapping(
      data_arr: xr.DataArray,
  ) -> tuple[xr.DataArray, xr.DataArray]:
      """Convert an area to at CF grid mapping."""
      data_arr = data_arr.copy()
      area = data_arr.attrs["area"]
      gmapping_var_name, attrs = _create_grid_mapping(area)
      data_arr.attrs["grid_mapping"] = gmapping_var_name
      return data_arr, xr.DataArray(
          0, attrs=attrs, name=gmapping_var_name
      )
  
imports: import logging
  import xarray
  from packaging.version import Version
  from pyresample.geometry import AreaDefinition, SwathDefinition
label_desc: Use image node_id 3 for calling a global function with example usage: _add_grid_mapping(data_arr) and returns: data_arr,  xr