def METHOD_NAME():
    def script_fn():
        raise Exception("foo")
    @asset
    def foo(context: AssetExecutionContext, ext: ExtSubprocess):
        with temp_script(script_fn) as script_path:
            cmd = [_PYTHON_EXECUTABLE, script_path]
            ext.run(cmd, context=context)
    with pytest.raises(DagsterExternalExecutionError):
        materialize([foo], resources={"ext": ExtSubprocess()})