code: def _merge_colormaps(kwargs, img=None):
      """Merge colormaps listed in kwargs."""
      from trollimage.colormap import Colormap
  
      full_cmap = None
  
      palette = kwargs["palettes"]
      if isinstance(palette, Colormap):
          full_cmap = palette
      else:
          for itm in palette:
              cmap = create_colormap(itm, img)
              if full_cmap is None:
                  full_cmap = cmap
              else:
                  full_cmap = full_cmap + cmap
  
      return full_cmap
  
imports: import logging
  import os
  from collections import namedtuple
  from functools import wraps
  from numbers import Number
  from typing import Optional
  import dask
  import dask.array
  import numpy
  import xarray
  from trollimage.colormap import Colormap
  from trollimage.xrimage import XRImage
  from satpy._compat import ArrayLike
  from satpy._config import get_config_path
  from satpy.utils import find_in_ancillary
label_desc: Use image node_id 19 for calling a global function with example usage: _merge_colormaps(kwargs, img) and returns: full_cmap