code: def test_convert_dict_colors_to_same_type(self):
      # test colortype
      color_dict = dict(apple="rgb(1, 1, 1)")
      colortype = 2
  
      pattern = (
          "You must select either rgb or tuple for your colortype "
          "variable."
      )
  
      self.assertRaisesRegex(
          PlotlyError,
          pattern,
          colors.convert_dict_colors_to_same_type,
          color_dict,
          colortype,
      )
  
file_path: plotly.py/packages/python/plotly/plotly/tests/test_core/test_colors/test_colors.py
imports: from unittest import TestCase
  import plotly.tools
  from plotly.exceptions import PlotlyError
  import plotly.colors
label_desc: Use image node_id 3 for calling the TestColors obj's underlying member method code with example usage: obj.test_convert_dict_colors_to_same_type() without return types