class_docstr: NWCSAF PPS&MSG NetCDF reader.
docstr: Scale the data set, applying the attributes from the netCDF file.
  
  The scale and offset attributes will then be removed from the resulting variable.
docstr_tok: ["Scale","the","data","set",",","applying","the","attributes","from","the","netCDF","file",".","The","scale","and","offset","attributes","will","then","be","removed","from","the","resulting","variable","."]
code: def scale_dataset(self, variable, info):
      """Scale the data set, applying the attributes from the netCDF file.
  
      The scale and offset attributes will then be removed from the resulting variable.
      """
      variable = remove_empties(variable)
  
      scale = variable.attrs.get("scale_factor", np.array(1))
      offset = variable.attrs.get("add_offset", np.array(0))
      if "_FillValue" in variable.attrs:
          variable.attrs["scaled_FillValue"] = (
              variable.attrs["_FillValue"] * scale + offset
          )
      if np.issubdtype(
          (scale + offset).dtype, np.floating
      ) or np.issubdtype(variable.dtype, np.floating):
          variable = self._mask_variable(variable)
      attrs = variable.attrs.copy()
      variable = variable * scale + offset
      variable.attrs = attrs
      if "valid_range" in variable.attrs:
          variable.attrs["valid_range"] = (
              variable.attrs["valid_range"] * scale + offset
          )
  
      variable.attrs.pop("add_offset", None)
      variable.attrs.pop("scale_factor", None)
  
      variable.attrs.update(
          {"platform_name": self.platform_name, "sensor": self.sensor}
      )
  
      if not variable.attrs.get("standard_name", "").endswith(
          "status_flag"
      ):
          # TODO: do we really need to add units to everything ?
          variable.attrs.setdefault("units", "1")
  
      ancillary_names = variable.attrs.get("ancillary_variables", "")
      try:
          variable.attrs[
              "ancillary_variables"
          ] = ancillary_names.split()
      except AttributeError:
          pass
  
      if "palette_meanings" in variable.attrs:
          variable = self._prepare_variable_for_palette(variable, info)
  
      if "standard_name" in info:
          variable.attrs.setdefault(
              "standard_name", info["standard_name"]
          )
      variable = self._adjust_variable_for_legacy_software(variable)
  
      return variable
  
imports: import functools
  import logging
  import os
  from contextlib import suppress
  from datetime import datetime
  import dask.array
  import numpy
  import xarray
  from pyproj import CRS
  from pyresample.geometry import AreaDefinition
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.readers.utils import unzip_file
  from satpy.utils import get_chunk_size_limit
label_desc: Use image node_id 9 for calling the NcNWCSAF obj's underlying member method code with example usage: obj.scale_dataset(variable, info) and returns: variable