class_docstr: Agent returns random candidate if available or repeats the label.
docstr: Initialize this agent.
docstr_tok: ["Initialize","this","agent","."]
code: def __init__(self, opt, shared=None):
      """
      Initialize this agent.
      """
      super().__init__(opt)
      self.id = "RandomCandidateAgent"
      random.seed(42)
      if opt.get("label_candidates_file"):
          f = open(opt.get("label_candidates_file"))
          self.label_candidates = f.read().split("\n")
  
file_path: ParlAI/parlai/agents/random_candidate/random_candidate.py
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  import random
  from parlai.core.agents import Agent
label_desc: Use image node_id 2 to create a new RandomCandidateAgent object from inherited base classes: Agent with example: obj = RandomCandidateAgent(opt, shared)