def METHOD_NAME(hierarchy: List[str]):
    with TemporaryDirectory() as prefix:
        for entry in hierarchy:
            path = Path(prefix) / entry
            if entry.endswith("/"):
                path.mkdir(parents=True, exist_ok=True)
            else:
                parent = path.parent
                if parent != Path("."):
                    parent.mkdir(parents=True, exist_ok=True)
                # create file
                path.open('w').close()
        yield get_path(prefix, is_directory=True)