code: def water_detection(img, **kwargs):
      """Palettizes images from VIIRS flood data.
  
      This modifies the image's data so the correct colors
      can be applied to it, and then palettizes the image.
      """
      palette = kwargs["palettes"]
      palette["colors"] = tuple(map(tuple, palette["colors"]))
  
      _water_detection(img.data)
      cm = Colormap(*palette["colors"])
      img.palettize(cm)
  
imports: import numpy
  from trollimage.colormap import Colormap
  from satpy.enhancements import exclude_alpha, using_map_blocks
label_desc: Use image node_id 1 for calling a global function with example usage: water_detection(img) without return types