def METHOD_NAME(dir_path, pipeline):
    """Run the provided pipeline file contents with the provided directory
    as current
    """
    f = tempfile.NamedTemporaryFile('w', suffix='.pipe', delete=False)
    try:
        with f:
            f.write(pipeline)
        args = ["kwiver", "runner", f.name]
        return subprocess.run(args, cwd=dir_path, check=True)
    finally:
        os.remove(f.name)