class_docstr: Shared operations for file handlers.
class_docstr_tok: ["Shared","operations","for","file","handlers","."]
docstr: Slice data if dimension layers have been provided in yaml-file.
docstr_tok: ["Slice","data","if","dimension","layers","have","been","provided","in","yaml-file","."]
code: def _slice_dataset(self, variable, dataset_info, dimensions):
      """Slice data if dimension layers have been provided in yaml-file."""
      slice_dict = {
          dim: dataset_info[dim_id]
          for (dim, dim_id) in dimensions.items()
          if dim_id in dataset_info.keys() and dim in variable.dims
      }
      for dim, dim_ind in slice_dict.items():
          logger.debug(
              f"Extracting {dimensions[dim]}-index {dim_ind} from dimension {dim!r}."
          )
      variable = variable.sel(slice_dict)
  
      return variable
  
imports: import logging
  from contextlib import suppress
  import numpy
  import xarray
  from pyresample import geometry
  from satpy._compat import cached_property
  from satpy.readers._geos_area import get_geos_area_naming, make_ext
  from satpy.readers.eum_base import get_service_mode
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.resample import get_area_def
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 6 for calling the FciL2CommonFunctions obj's underlying member method code with example usage: obj._slice_dataset(variable, dataset_info, dimensions) and returns: variable