code: def test_grid_control_axis_index():
      bar = _chart_for_grid()
      gc = Grid().add(
          bar,
          opts.GridOpts(pos_left="5%", pos_right="20%"),
          is_control_axis_index=True,
      )
      expected_idx = (0, 1, 2)
      for idx, series in enumerate(gc.options.get("series")):
          assert_equal(series.get("yAxisIndex"), expected_idx[idx])
  
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 2 for calling a global function with example usage: test_grid_control_axis_index() without return types