class_docstr: A base class for the CLAVRx File Handlers.
class_docstr_tok: ["A","base","class","for","the","CLAVRx","File","Handlers","."]
docstr: Scale data, if needed.
docstr_tok: ["Scale","data",",","if","needed","."]
code: def _scale_data(
      data_arr: Union[xr.DataArray, int],
      scale_factor: float,
      add_offset: float,
  ) -> xr.DataArray:
      """Scale data, if needed."""
      scaling_needed = not (scale_factor == 1.0 and add_offset == 0.0)
      if scaling_needed:
          data_arr = data_arr * scale_factor + add_offset
      return data_arr
  
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 2 for calling the _CLAVRxHelper obj's underlying member method code with example usage: obj._scale_data(data_arr, scale_factor, add_offset) and returns: data_arr