def METHOD_NAME(responses, sleep=0):
    @staticmethod
    async def dummy_post(url, headers, data=None, content=None):
        assert data or content
        await asyncio.sleep(sleep)
        data = json.loads(content.decode("utf-8", "replace"))
        data_ = data if isinstance(data, list) else [data]
        texts = [_decompress_text(instance) for instance in data_]
        responses_ = [responses[t] for t in texts]
        r = {"embedding": responses_ if isinstance(data, list) else responses_[0]}
        return DummyResponse(content=json.dumps(r).encode("utf-8"))
    return dummy_post