code: def _generate_cmap_test_data(color_scale, colormap_mode):
      cmap_data = np.array(
          [
              [1, 0, 0],
              [1, 1, 0],
              [1, 1, 1],
              [0, 0, 1],
          ],
          dtype=np.float64,
      )
      if len(colormap_mode) != 3:
          _cmap_data = cmap_data
          cmap_data = np.empty(
              (cmap_data.shape[0], len(colormap_mode)), dtype=np.float64
          )
          if colormap_mode.startswith("V") or colormap_mode.endswith(
              "A"
          ):
              cmap_data[:, 0] = np.array([128, 130, 132, 134]) / 255.0
              cmap_data[:, -3:] = _cmap_data
          if colormap_mode.startswith("V") and colormap_mode.endswith(
              "A"
          ):
              cmap_data[:, 1] = np.array([128, 130, 132, 134]) / 255.0
      if color_scale is None or color_scale == 255:
          cmap_data = (cmap_data * 255).astype(np.uint8)
      return cmap_data
  
imports: import contextlib
  import os
  from tempfile import NamedTemporaryFile
  from unittest import mock
  import dask.array
  import numpy
  import pytest
  import xarray
  from satpy.enhancements import create_colormap, on_dask_array, on_separate_bands, using_map_blocks
label_desc: Use image node_id 5 for calling a global function with example usage: _generate_cmap_test_data(color_scale, colormap_mode) and returns: cmap_data