code: def ensure_unique_nondimensional_coords(
      data_arrays: dict[str, xr.DataArray], pretty: bool = False
  ) -> dict[str, xr.DataArray]:
      """Make non-dimensional coordinates unique among all datasets.
  
      Non-dimensional coordinates, such as scanline timestamps,
      may occur in multiple datasets with the same name and dimension
      but different values.
  
      In order to avoid conflicts, prepend the dataset name to the coordinate name.
      If a non-dimensional coordinate is unique among all datasets and ``pretty=True``,
      its name will not be modified.
  
      Since all datasets must have the same projection coordinates,
      this is not applied to latitude and longitude.
  
      Args:
          data_arrays:
              Dictionary of (dataset name, dataset)
          pretty:
              Don't modify coordinate names, if possible. Makes the file prettier, but possibly less consistent.
  
      Returns:
          Dictionary holding the updated datasets
  
      """
      # Determine which non-dimensional coordinates are unique
      # - coords_unique has structure: {coord_name: True/False}
      is_coords_unique_dict = _get_is_nondimensional_coords_dict(
          data_arrays
      )
  
      # Prepend dataset name, if not unique or no pretty-format desired
      new_dict_dataarrays = data_arrays.copy()
      for coord_name, unique in is_coords_unique_dict.items():
          if not pretty or not unique:
              _warn_if_pretty_but_not_unique(pretty, coord_name)
              new_dict_dataarrays = _rename_coords(
                  new_dict_dataarrays, coord_name
              )
      return new_dict_dataarrays
  
imports: from __future__ import annotations
  import logging
  import warnings
  from collections import defaultdict
  from contextlib import suppress
  import numpy
  import xarray
  from dask.base import tokenize
  from pyproj import CRS
  from pyresample.geometry import AreaDefinition, SwathDefinition
label_desc: Use image node_id 15 for calling a global function with example usage: ensure_unique_nondimensional_coords(data_arrays, pretty) and returns: new_dict_dataarrays