code: def test_gggrid_global_theme_override_cancelled():
      # Set global setting!
      gg.LetsPlot.set_theme(gg.theme_grey())
  
      try:
          fig = (
              gg.ggplot() + gg.theme_bw()
          )  # this should cancel global theme for this figure
          spec = gg.gggrid([fig]) + gg.theme_light()
      finally:
          # Clear global setting
          gg.LetsPlot.set({PLOT_THEME: None})
  
      assert "theme" in spec.as_dict()
      assert spec.as_dict()["theme"] == {"name": "light"}
  
      # The figure no longer uses global theme thus it should be present in the figure spec.
      fig = spec.as_dict()["figures"][0]
      assert fig["kind"] == "plot"  # Make sure it's a plot
      assert fig["theme"] == {"name": "bw"}
  
file_path: lets-plot/python-package/test/plot/test_gggrid_theme.py
imports: import lets_plot
  from lets_plot._global_settings import PLOT_THEME
label_desc: Use image node_id 6 for calling a global function with example usage: test_gggrid_global_theme_override_cancelled() without return types