def METHOD_NAME(tmpdir, dir_exists):
    """
    :return:
    """
    test_yaml = """
    behaviors:
        BigWallJump:
            init_path: BigWallJump-6540981.pt #full path
            trainer_type: ppo
        MediumWallJump:
            init_path: {}/test_setup_init_path_results/test_run_id/MediumWallJump/checkpoint.pt
            trainer_type: ppo
        SmallWallJump:
            trainer_type: ppo
    checkpoint_settings:
        run_id: test_run_id
        initialize_from: test_run_id
    """.format(
        tmpdir
    )
    run_options = RunOptions.from_dict(yaml.safe_load(test_yaml))
    if dir_exists:
        init_path = tmpdir.mkdir("test_setup_init_path_results").mkdir("test_run_id")
        big = init_path.mkdir("BigWallJump").join("BigWallJump-6540981.pt")
        big.write("content")
        med = init_path.mkdir("MediumWallJump").join("checkpoint.pt")
        med.write("content")
        small = init_path.mkdir("SmallWallJump").join("checkpoint.pt")
        small.write("content")
        setup_init_path(run_options.behaviors, init_path)
        assert run_options.behaviors["BigWallJump"].init_path == big
        assert run_options.behaviors["MediumWallJump"].init_path == med
        assert run_options.behaviors["SmallWallJump"].init_path == small
    else:
        # don't make dirs and fail
        with pytest.raises(UnityTrainerException):
            setup_init_path(
                run_options.behaviors, run_options.checkpoint_settings.maybe_init_path
            )