code: def get_mturk_id_from_mephisto_wrapper(agent):
      """
      Returns the MTurk worker ID from a ParlAI-Wrapped Mephisto Agent.
      """
      if not isinstance(agent, MTurkAgent):
          return f"--NOT-MTURK-AGENT-{agent.mephisto_agent.get_worker().worker_name}"
      return agent.mephisto_agent.get_worker().get_mturk_worker_id()
  
file_path: ParlAI/parlai/crowdsourcing/utils/mturk.py
imports: import time
  import random
  from dataclasses import dataclass, field
  from typing import Optional
  from mephisto.abstractions.database import MephistoDB
  from mephisto.abstractions.providers.mturk.mturk_agent import MTurkAgent
  from mephisto.abstractions.providers.mturk.utils.script_utils import direct_soft_block_mturk_workers
  from mephisto.operations.hydra_config import RunScriptConfig
  from mephisto.operations.operator import Operator
  from mephisto.tools.scripts import load_db_and_process_config
  from omegaconf import DictConfig, OmegaConf, MISSING
  from parlai.crowdsourcing.utils.frontend import build_task
label_desc: Use image node_id 1 for calling a global function with example usage: get_mturk_id_from_mephisto_wrapper(agent) and returns: agent, str, agent