code: def test_spec_to_vega_mimebundle(vega_spec):
      # ValueError: mode must be 'vega-lite'
      with pytest.raises(ValueError):
          spec_to_mimebundle(
              spec=vega_spec,
              mode="vega",
              format="vega",
              vega_version=alt.VEGA_VERSION,
          )
  
file_path: altair/tests/utils/test_mimebundle.py
imports: import pytest
  import altair
  from altair import VEGA_VERSION
  from altair.utils.mimebundle import spec_to_mimebundle
label_desc: Use image node_id 5 for calling a global function with example usage: test_spec_to_vega_mimebundle(vega_spec) without return types