code: def test_bar_title_options(fake_writer):
      c = (
          Bar()
          .add_xaxis(["A", "B", "C"])
          .add_yaxis("series0", [1, 2, 4])
          .set_global_opts(
              title_opts=opts.TitleOpts(
                  title="This is title.", subtitle="This is subtitle."
              )
          )
      )
      c.render()
      file_name, content = fake_writer.call_args[0]
      assert_equal("render.html", file_name)
      assert_in("This is title.", content)
      assert_in("This is subtitle.", content)
      assert_not_in("null", 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 8 for calling a global function with example usage: test_bar_title_options(fake_writer) without return types