code: def _run(program, args):
      func = getattr(ninja, program)
      args = ["%s.py" % program] + args
      with push_argv(args), pytest.raises(SystemExit) as excinfo:
          func()
      assert excinfo.value.code == 0
  
file_path: ninja-python-distributions/tests/test_ninja.py
imports: import os
  import subprocess
  import sys
  import sysconfig
  import pytest
  from importlib_metadata import distribution
  import ninja
  from .None import push_argv
label_desc: Use image node_id 1 for calling a global function with example usage: _run(program, args) without return types