code: def test_values_by_dict(Chart):
      """Test serie as dict"""
      chart1 = Chart(no_prefix=True)
      chart2 = Chart(no_prefix=True)
  
      if not issubclass(Chart, BaseMap) and not Chart._dual:
          chart1.add("A", {"red": 10, "green": 12, "blue": 14})
          chart1.add("B", {"green": 11, "red": 7})
          chart1.add("C", {"blue": 7})
          chart1.add("D", {})
          chart1.add("E", {"blue": 2, "red": 13})
          chart1.x_labels = ("red", "green", "blue")
  
          chart2.add("A", [10, 12, 14])
          chart2.add("B", [7, 11])
          chart2.add("C", [None, None, 7])
          chart2.add("D", [])
          chart2.add("E", [13, None, 2])
          chart2.x_labels = ("red", "green", "blue")
      elif not Chart._dual:
          chart1.add("A", {"fr": 10, "us": 12, "jp": 14})
          chart1.add("B", {"cn": 99})
          chart1.add("C", {})
  
          chart2.add("A", [("fr", 10), ("us", 12), ("jp", 14)])
          chart2.add("B", [("cn", 99)])
          chart2.add("C", [None, (None, None)])
  
      assert chart1.render() == chart2.render()
  
imports: import io
  import os
  import uuid
  import pytest
  import pygal
  from pygal.graph.map import BaseMap
  from pygal.test import make_data
  from pygal.util import cut
label_desc: Use image node_id 12 for calling a global function with example usage: test_values_by_dict(Chart) without return types