code: def test_bar_add_dataset(fake_writer):
      c = (
          Bar()
          .add_dataset(
              source=[
                  ["product", "2015", "2016", "2017"],
                  ["Matcha Latte", 43.3, 85.8, 93.7],
                  ["Milk Tea", 83.1, 73.4, 55.1],
                  ["Cheese Cocoa", 86.4, 65.2, 82.5],
                  ["Walnut Brownie", 72.4, 53.9, 39.1],
              ]
          )
          .add_yaxis(series_name="2015", y_axis=[])
          .add_yaxis(series_name="2016", y_axis=[])
          .add_yaxis(series_name="2017", y_axis=[])
          .set_global_opts(
              title_opts=opts.TitleOpts(
                  title="Dataset simple bar example"
              ),
              xaxis_opts=opts.AxisOpts(type_="category"),
          )
      )
      c.render()
      _, content = fake_writer.call_args[0]
      assert_in("dataset", content)
  
imports: import re
  import sys
  from io import StringIO
  from test import stdout_redirect
  from unittest.mock import patch
  from nose.tools import assert_equal, assert_greater, assert_in, assert_not_in
  from pyecharts import options
  from pyecharts.charts import Bar
  from pyecharts.commons.utils import JsCode
  from pyecharts.globals import CurrentConfig, NotebookType, ThemeType
  from pyecharts.render.display import HTML
label_desc: Use image node_id 17 for calling a global function with example usage: test_bar_add_dataset(fake_writer) without return types