code: def test_render_examples_to_png(engine, syntax_module):
      for filename in iter_examples_filenames(syntax_module):
          if engine == "vl-convert" and vlc is None:
              pytest.skip(
                  "vl_convert not importable; cannot run mimebundle tests"
              )
          elif engine == "altair_saver":
              if altair_saver is None:
                  pytest.skip(
                      "altair_saver not importable; cannot run png tests"
                  )
              if "png" not in altair_saver.available_formats(
                  "vega-lite"
              ):
                  pytest.skip(
                      "altair_saver not configured to save to png"
                  )
  
          source = pkgutil.get_data(syntax_module.__name__, filename)
          chart = eval_block(source)
          out = io.BytesIO()
          chart.save(out, format="png", engine=engine)
          assert out.getvalue().startswith(b"\x89PNG")
  
file_path: altair/tests/test_examples.py
imports: import io
  import pkgutil
  import pytest
  import altair
  from altair.utils.execeval import eval_block
  from tests import examples_arguments_syntax
  from tests import examples_methods_syntax
label_desc: Use image node_id 4 for calling a global function with example usage: test_render_examples_to_png(engine, syntax_module) without return types