code: def get_bot_worker(
      opt: Dict[str, Any], model_name: str
  ) -> TurkLikeAgent:
      """
      Return a bot agent.
  
      Agent behaves like a crowdsource worker but actually wraps around a dialogue model.
      """
      semaphore = opt["semaphore"]
      shared_bot_agents = opt["shared_bot_agents"]
      num_turns = opt["num_turns"]
      bot_agent = create_agent_from_shared(
          shared_bot_agents[model_name]
      )
      bot_worker = TurkLikeAgent(
          opt,
          model_name=model_name,
          model_agent=bot_agent,
          num_turns=num_turns,
          semaphore=semaphore,
      )
      return bot_worker
  
imports: import time
  import os
  import json
  from abc import ABC, abstractmethod
  from typing import Any, Dict, List, Optional, Tuple
  import numpy
  from parlai.core.agents import create_agent_from_shared
  from parlai.core.message import Message
  from parlai.core.worlds import validate
  from parlai.crowdsourcing.utils.acceptability import AcceptabilityChecker
  from parlai.crowdsourcing.utils.worlds import CrowdOnboardWorld, CrowdTaskWorld
  from parlai.crowdsourcing.tasks.model_chat.bot_agent import TurkLikeAgent
  from parlai.crowdsourcing.tasks.model_chat.constants import ONBOARD_FAIL, ONBOARD_SUCCESS
  from parlai.crowdsourcing.tasks.model_chat.utils import Compatibility
  from parlai.crowdsourcing.utils.mturk import get_mturk_id_from_mephisto_wrapper
  from typing import TYPE_CHECKING
label_desc: Use image node_id 3 for calling a global function with example usage: get_bot_worker(opt, model_name) and returns: bot_worker