code: def test_json_renderer_embed_options(chart, renderer="json"):
      """Test that embed_options in renderer metadata are correctly manifest in html"""
      mimetype = "application/json"
      spec = chart.to_dict()
      with alt.renderers.enable(renderer):
          # Sanity check: no options specified
          bundle, metadata = chart._repr_mimebundle_(None, None)
          assert bundle[mimetype] == spec
          assert metadata == {}
  
          with alt.renderers.enable(option="foo"):
              bundle, metadata = chart._repr_mimebundle_(None, None)
              assert set(bundle.keys()) == {mimetype, "text/plain"}
              assert bundle[mimetype] == spec
              assert metadata == {mimetype: {"option": "foo"}}
  
file_path: altair/tests/vegalite/v5/test_renderers.py
imports: import json
  import pytest
  import altair.vegalite.v5
label_desc: Use image node_id 4 for calling a global function with example usage: test_json_renderer_embed_options(chart, renderer) without return types