code: def _get_channel_name_from_dsname(dsname):
      # FIXME: replace by .removesuffix after we drop support for Python < 3.9
      if dsname.endswith("_pixel_quality"):
          channel_name = dsname[: -len("_pixel_quality")]
      elif dsname.endswith("_index_map"):
          channel_name = dsname[: -len("_index_map")]
      elif _get_aux_data_name_from_dsname(dsname) is not None:
          channel_name = dsname[
              : -len(_get_aux_data_name_from_dsname(dsname)) - 1
          ]
      else:
          channel_name = dsname
  
      return channel_name
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from datetime import timedelta
  from functools import cached_property
  import dask.array
  import numpy
  import xarray
  from netCDF4 import default_fillvals
  from pyresample import geometry
  from satpy.readers._geos_area import get_geos_area_naming
  from satpy.readers.eum_base import get_service_mode
  from .netcdf_utils import NetCDF4FsspecFileHandler
label_desc: Use image node_id 2 for calling a global function with example usage: _get_channel_name_from_dsname(dsname) and returns: channel_name