class_docstr: Class for testing enhancements in satpy.enhancements.
class_docstr_tok: ["Class","for","testing","enhancements","in","satpy.enhancements","."]
docstr: Test the palettize enhancement function.
code: def test_palettize(self):
      """Test the palettize enhancement function."""
      from trollimage.colormap import brbg
  
      from satpy.enhancements import palettize
  
      expected = np.array([[[10, 0, 0, 10, 10], [10, 10, 10, 10, 10]]])
      run_and_check_enhancement(
          palettize, self.ch1, expected, palettes=brbg
      )
  
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 7 for calling the TestEnhancementStretch obj's underlying member method code with example usage: obj.test_palettize() without return types