code: def test_bar_series_stack(fake_writer):
      c = (
          Bar()
          .add_xaxis(["A", "B", "C"])
          .add_yaxis("series0", [1, 2, 4])
          .add_yaxis("series1", [2, 3, 6])
          .add_yaxis("series2", [5, 8, 7])
          .set_series_opts(stack="MY_STACK_NAME")
      )
      c.render()
      _, content = fake_writer.call_args[0]
      stack_cnt = re.findall("MY_STACK_NAME", content)
      assert_equal(3, len(stack_cnt))
  
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 7 for calling a global function with example usage: test_bar_series_stack(fake_writer) without return types