code: def test_version(mocked_exit):
      mocked_stdout = io.StringIO()
  
      with mock.patch.object(sys, "stdout", new=mocked_stdout):
          cli.parse_args(["-v"])
  
      assert mocked_stdout.getvalue().strip() == f"m2cgen {__version__}"
  
imports: import io
  import sys
  from unittest import mock
  from _pytest import capture
  from m2cgen import __version__, cli
  from tests.utils import verify_python_model_is_expected
label_desc: Use image node_id 14 for calling a global function with example usage: test_version(mocked_exit) without return types