code: def test_convert_color(color, expected_result):
      result = convert_color(color)
  
      if isinstance(result, np.ndarray):
          assert np.allclose(result, expected_result)
      else:
          assert result == expected_result
  
imports: import matplotlib.pyplot
  import numpy
  import pytest
  from shap.plots import colors
  from shap.plots._utils import convert_color
label_desc: Use image node_id 1 for calling a global function with example usage: test_convert_color(color, expected_result) without return types