code: def decode_lut_arr(arr, lut):
      """Decode an array using a lookup table."""
      dtype = lut.dtype
      lut_attrs = lut.attrs
  
      attrs = arr.attrs
      attrs["units"] = lut_attrs["units"]
      attrs["long_name"] = lut_attrs["long_name"]
      new_darr = da.map_blocks(
          apply_lut, arr.data, lut=np.asanyarray(lut), dtype=dtype
      )
      new_arr = xr.DataArray(
          new_darr, dims=arr.dims, attrs=attrs, coords=arr.coords
      )
      new_arr = new_arr.where(arr.data != attrs["_FillValue"])
      return new_arr
  
imports: from contextlib import suppress
  from datetime import datetime
  from functools import cached_property
  import dask.array
  import numpy
  import xarray
  from satpy.utils import import_error_helper
  from satpy.readers.file_handlers import BaseFileHandler
label_desc: Use image node_id 2 for calling a global function with example usage: decode_lut_arr(arr, lut) and returns: new_arr