code: def _merge_colormaps(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)
              cmap.set_range(itm["min_value"], itm["max_value"])
              if full_cmap is None:
                  full_cmap = cmap
              else:
                  full_cmap = full_cmap + cmap
  
      return full_cmap
docs: Merge colormaps listed in kwargs.