from pathlib import Path


def tmpdir_for_nested_scatter(tmpdir_factory, wdl_nested_scatter):
    """Temporary directory with nested-scatter WDL.

    There is 1 file on this directory.
        - main WDL: nested_scatter.wdl

    Returns a PathLib object of the root directory.
    """
    root = tmpdir_factory.mktemp('nested_scatter')
    Path(root / 'nested_scatter.wdl').write_text(wdl_nested_scatter)

    return root