code: def test_grid_options(fake_writer):
      bar = _chart_for_grid()
      gc = Grid(init_opts=opts.InitOpts(theme=ThemeType.ESSOS)).add(
          bar,
          opts.GridOpts(
              pos_left="5%", pos_right="20%", is_contain_label=True
          ),
      )
      gc.render()
      _, content = fake_writer.call_args[0]
      assert_in("containLabel", content)
      assert_in("color", content)
  
file_path: pyecharts/test/test_grid.py
imports: from unittest.mock import patch
  from nose.tools import assert_equal, assert_in
  from pyecharts import options
  from pyecharts.charts import Bar, Grid, Line, Radar, Geo, Map
  from pyecharts.globals import ThemeType, ChartType
  from pyecharts.faker import Faker
  from pyecharts.commons.utils import JsCode
label_desc: Use image node_id 4 for calling a global function with example usage: test_grid_options(fake_writer) without return types