class_docstr: NetCDF4 reader for VIIRS Active Fires.
class_docstr_tok: ["NetCDF4","reader","for","VIIRS","Active","Fires","."]
code: def _mask_invalid(
      self, data_arr: xr.DataArray, ds_info: dict
  ) -> xr.DataArray:
      # xarray auto mask and scale handled any fills from the file
      valid_range = ds_info.get(
          "valid_range", data_arr.attrs.get("valid_range")
      )
      if "valid_min" in data_arr.attrs and valid_range is None:
          valid_range = (
              data_arr.attrs["valid_min"],
              data_arr.attrs["valid_max"],
          )
      if valid_range is not None:
          return data_arr.where(
              (valid_range[0] <= data_arr)
              & (data_arr <= valid_range[1])
          )
      return data_arr
  
imports: from __future__ import annotations
  import logging
  from typing import Iterable
  import dask.array
  import xarray
  from satpy import DataID
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.utils import get_chunk_size_limit
label_desc: Use image node_id 4 for calling the VIIRSJRRFileHandler obj's underlying member method code with example usage: obj._mask_invalid(data_arr, ds_info) and returns: data_arr, data_arr