code: def test_normalize():
      """Test the _normalize() function."""
      from vispy.color.colormap import _normalize
  
      for x in (-1, 0.0, 0.5, 1.0, 10.0, 20):
          assert _normalize(x) == 0.5
      assert_allclose(_normalize((-1.0, 0.0, 1.0)), (0.0, 0.5, 1.0))
      assert_allclose(
          _normalize((-1.0, 0.0, 1.0), 0.0, 1.0), (0.0, 0.0, 1.0)
      )
      assert_allclose(
          _normalize((-1.0, 0.0, 1.0), 0.0, 1.0, clip=False),
          (-1.0, 0.0, 1.0),
      )
  
      y = _normalize(np.random.randn(100, 5), -10.0, 10.0)
      assert_allclose(
          [y.min(), y.max()], [0.2975, 1 - 0.2975], 1e-1, 1e-1
      )
  
file_path: vispy/vispy/color/tests/test_color.py
imports: import numpy
  from numpy.testing import assert_array_equal, assert_allclose
  from vispy.color import Color, ColorArray, get_color_names, Colormap, get_color_dict, get_colormap, get_colormaps
  from vispy.visuals.shaders import Function
  from vispy.util import use_log_level
  from vispy.testing import run_tests_if_main, assert_equal, assert_raises, assert_true
label_desc: Use image node_id 9 for calling a global function with example usage: test_normalize() without return types