class_docstr: Writer to produce MITIFF image files.
code: def _get_dataset_len(self, datasets):
      if isinstance(datasets, list):
          LOG.debug("len datasets: %s", len(datasets))
          dataset_len = str(len(datasets))
      elif "bands" in datasets.sizes:
          LOG.debug("len datasets: %s", datasets.sizes["bands"])
          dataset_len = str(datasets.sizes["bands"])
      elif len(datasets.sizes) == 2:
          LOG.debug("len datasets: 1")
          dataset_len = "1"
      else:
          dataset_len = ""
      return dataset_len
  
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 20 for calling the MITIFFWriter obj's underlying member method code with example usage: obj._get_dataset_len(datasets) and returns: dataset_len