def METHOD_NAME(request):
    tmp_dir = tempfile.mkdtemp(prefix="salt_pass_")
    pass_path = os.path.join(tmp_dir, "pass")
    with salt.utils.files.fopen(pass_path, "wb") as f:
        f.write(b"#!/bin/sh\n")
        # return invalid utf-8 sequence
        f.write(b'echo "\x80\x81"\n')
    os.chmod(pass_path, 0o755)
    yield pass_path
    shutil.rmtree(tmp_dir)