def METHOD_NAME(*docs):
    with tempfile.TemporaryDirectory() as tmpdirname:
        dirname = Path(tmpdirname)
        for i, doc in enumerate(docs):
            doc_dirname = dirname / f"doc{i}"
            doc_dirname.mkdir()
            with open(doc_dirname / "index.json", "w") as f:
                json.dump(doc, f)
        yield dirname