code: def _create_colormap_from_dataset(img, dataset, color_scale):
      """Create a colormap from an auxiliary variable in a source file."""
      match = find_in_ancillary(img.data, dataset)
      return Colormap.from_array_with_metadata(
          match,
          img.data.dtype,
          color_scale,
          valid_range=img.data.attrs.get("valid_range"),
          scale_factor=img.data.attrs.get("scale_factor", 1),
          add_offset=img.data.attrs.get("add_offset", 0),
          remove_last=False,
      )
  
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 21 for calling a global function with example usage: _create_colormap_from_dataset(img, dataset, color_scale) and returns: Colormap