def METHOD_NAME(num_nodes, monkeypatch, fake_script):
    monkeypatch.setattr(torch.distributed, "run", Mock())
    with pytest.raises(SystemExit) as e:
        _run_model.main([fake_script, "--num-nodes", num_nodes])
    assert e.value.code == 0
    assert os.environ["LT_NUM_NODES"] == num_nodes