def METHOD_NAME(tmp_file):
    cmd = "echo $TEST_VAR"
    res, retcode = execute(
        cmd, output_logging="BUFFER", log=logging, env={"TEST_VAR": "some_env_value"}
    )
    assert res.strip() == "some_env_value"
    assert retcode == 0
    # By default, pulls in env from the calling process
    with environ({"TEST_VAR": "some_other_env_value"}):
        res, retcode = execute(cmd, output_logging="BUFFER", log=logging)
        assert res.strip() == "some_other_env_value"
        assert retcode == 0
    with tmp_file(cmd) as (_, tmp_file):
        res, retcode = execute_script_file(
            tmp_file,
            output_logging="BUFFER",
            log=logging,
            env={"TEST_VAR": "some_env_value"},
        )
        assert res.strip() == "some_env_value"
        assert retcode == 0