class_docstr: A base class for the CLAVRx File Handlers.
class_docstr_tok: ["A","base","class","for","the","CLAVRx","File","Handlers","."]
docstr: Get a dataset.
docstr_tok: ["Get","a","dataset","."]
code: def _get_data(data, dataset_id: dict) -> xr.DataArray:
      """Get a dataset."""
      if dataset_id.get("resolution"):
          data.attrs["resolution"] = dataset_id["resolution"]
  
      attrs = data.attrs.copy()
  
      fill = attrs.get("_FillValue")
      factor = attrs.pop(
          "scale_factor", (np.ones(1, dtype=data.dtype))[0]
      )
      offset = attrs.pop(
          "add_offset", (np.zeros(1, dtype=data.dtype))[0]
      )
      valid_range = attrs.get("valid_range", [None])
      if isinstance(valid_range, np.ndarray):
          attrs["valid_range"] = valid_range.tolist()
  
      flags = not data.attrs.get("SCALED", 1) and any(
          data.attrs.get("flag_values", [None])
      )
      if not flags:
          data = data.where(data != fill)
          data = _CLAVRxHelper._scale_data(data, factor, offset)
          # don't need _FillValue if it has been applied.
          attrs.pop("_FillValue", None)
  
      if all(valid_range):
          valid_min = _CLAVRxHelper._scale_data(
              valid_range[0], factor, offset
          )
          valid_max = _CLAVRxHelper._scale_data(
              valid_range[1], factor, offset
          )
          if flags:
              data = data.where(
                  (data >= valid_min) & (data <= valid_max), fill
              )
          else:
              data = data.where(
                  (data >= valid_min) & (data <= valid_max)
              )
          attrs["valid_range"] = [valid_min, valid_max]
  
      data.attrs = _CLAVRxHelper._remove_attributes(attrs)
  
      return data
  
imports: import logging
  import os
  from glob import glob
  from typing import Optional, Union
  import netCDF4
  import numpy
  import xarray
  from pyresample import geometry
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.readers.hdf4_utils import SDS, HDF4FileHandler
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 3 for calling the _CLAVRxHelper obj's underlying member method code with example usage: obj._get_data(data, dataset_id) and returns: data