def METHOD_NAME(ctx: Context, actor: Actor) -> str:
    if not os.path.exists("/data/documents"):
        os.mkdir("/data/documents")
    dialog = int_ctx.get_dialog(ctx, actor)
    context = dialog.get("utterances", [])[-N_UTTERANCES_CONTEXT:]
    utterance_texts = [uttr.get("text", "") for uttr in context]
    if utterance_texts:
        raw_candidates = context[-1].get("annotations", {}).get("doc_retriever", {}).get("candidate_files", [])
        filepaths_on_server = (
            context[-1].get("user", {}).get("attributes", {}).get("documents_qa_model", {}).get("document_links", [])
        )
        filepaths_in_container = []
        for filepath in filepaths_on_server:
            file_id = re.search(FIND_ID, filepath).group(1)
            filepath_container = f"/data/documents/{file_id}.txt"
            orig_file = requests.get(filepath, timeout=FILE_SERVER_TIMEOUT)
            with open(filepath_container, "wb") as f:
                f.write(orig_file.content)
            filepaths_in_container.append(filepath_container)
        dataset_path = "/data/temporary_dataset/"
        if not os.path.exists(dataset_path):
            os.mkdir(dataset_path)
        logger.info(
            f"""Building dataset to get candidate texts. raw_candidates: {raw_candidates},