def METHOD_NAME(self, query: str, documents: List[Document], top_k: Optional[int] = None):  # type: ignore
    self.query_count += 1
    if documents:
        predict = self.timing(self.predict, "query_time")
        results = predict(query=query, documents=documents, top_k=top_k)
    else:
        results = []
    document_ids = [doc.id for doc in results]
    logger.debug("Retrieved documents with IDs: %s", document_ids)
    output = {"documents": results}
    return output, "output_1"