code: def soft_block_mturk_workers(
      cfg: DictConfig, db: MephistoDB, soft_block_qual_name: str
  ):
      """
      Soft-block all MTurk workers listed in the input paths.
      """
      if cfg.mephisto.provider.get("_provider_type", "mock") == "mturk":
          if cfg.mturk.get("worker_blocklist_paths", None) is None:
              print(
                  "Skipping soft-blocking workers because no blocklist path(s) are given."
              )
          else:
              blocklist_paths = cfg.mturk.worker_blocklist_paths.split(
                  ","
              )
              worker_blocklist = set()
              for path in blocklist_paths:
                  with open(path) as f:
                      worker_blocklist |= set(
                          f.read().strip().split("\n")
                      )
              print(
                  f"About to soft-block {len(worker_blocklist):d} workers by "
                  f'giving them the qualification "{soft_block_qual_name}".'
              )
              direct_soft_block_mturk_workers(
                  db=db,
                  worker_list=list(worker_blocklist),
                  soft_block_qual_name=soft_block_qual_name,
                  requester_name=cfg.mephisto.provider.get(
                      "requester_name", None
                  ),
              )
  
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 2 for calling a global function with example usage: soft_block_mturk_workers(cfg, db, soft_block_qual_name) without return types