code: def act(self):
      # retrieve knowledge based on the dialogue history using a TF-IDF retriever
      knowledge, knowledge_no_title = self.tfidf_retriever_act(
          self.retriever_history
      )
  
      act = {"text": knowledge, "episode_done": False, "id": self.id}
      act["checked_sentence"] = self._get_checked_sentence(
          knowledge_no_title
      )
      act["title"] = self.retriever_history.get("chosen_topic", "")
  
      # add the wizard reply to the dialogue history (this only happens
      # if there are labels or eval_labels -- not in interactive mode)
      if self.next_wizard is not None:
          self.maintain_retriever_history(
              {"text": self.next_wizard}, actor_id="wizard"
          )
  
      return act
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from parlai.core.agents import Agent, create_agent, create_agent_from_shared
  from parlai.core.torch_ranker_agent import TorchRankerAgent
  from parlai.tasks.wizard_of_wikipedia.agents import TOKEN_KNOWLEDGE
  from parlai.zoo.wizard_of_wikipedia.knowledge_retriever import download
  import json
  import os
label_desc: Use image node_id 12 for calling the KnowledgeRetrieverAgent obj's underlying member method code with example usage: obj.act() and returns: act