class_docstr: Writer to produce MITIFF image files.
docstr: Save datasets as an enhanced RGB image.
docstr_tok: ["Save","datasets","as","an","enhanced","RGB","image","."]
code: def _save_as_enhanced(self, datasets, tmp_gen_filename, **kwargs):
      """Save datasets as an enhanced RGB image."""
      img = get_enhanced_image(
          datasets.squeeze(), enhance=self.enhancer
      )
      tiffinfo = {}
      if "bands" in img.data.sizes and "bands" not in datasets.sizes:
          LOG.debug(
              "Datasets without 'bands' become image with 'bands' due to enhancement."
          )
          LOG.debug("Needs to regenerate mitiff image description")
      image_description = self._make_image_description(
          img.data, **kwargs
      )
      tiffinfo[IMAGEDESCRIPTION] = (image_description).encode("utf-8")
  
      mitiff_frames = []
      for band in img.data["bands"]:
          chn = img.data.sel(bands=band)
          data = chn.values.clip(0, 1) * 254.0 + 1
          data = data.clip(0, 255)
          mitiff_frames.append(
              Image.fromarray(data.astype(np.uint8), mode="L")
          )
      mitiff_frames[0].save(
          tmp_gen_filename,
          save_all=True,
          append_images=mitiff_frames[1:],
          compression="raw",
          compress_level=9,
          tiffinfo=tiffinfo,
      )
  
imports: import logging
  import os
  import dask
  import numpy
  from PIL import Image, ImagePalette
  from satpy.dataset import DataID, DataQuery
  from satpy.writers import ImageWriter, get_enhanced_image
label_desc: Use image node_id 24 for calling the MITIFFWriter obj's underlying member method code with example usage: obj._save_as_enhanced(datasets, tmp_gen_filename) without return types