code: def main(opt):
      pert_percent = int(opt["percentage"])
      if opt["perturbation_ids"]:
          filename = opt["perturbation_ids"]
          print(f"Using perturbation indices provided in {filename}")
          deterministic_perturbations(
              set_path=opt["dataset_path"],
              ids_path=filename,
              percent=pert_percent,
          )
      else:
          print(f"Including random perturbations")
          random_perturbations(
              set_path=opt["dataset_path"], percent=pert_percent
          )
  
file_path: ParlAI/projects/roscoe/roscoe_data/restore_data.py
imports: import copy
  import json
  import os
  import random
  from typing import Any, Dict, Iterable, List, Set
  from parlai.core.params import ParlaiParser
label_desc: Use image node_id 9 for calling a global function with example usage: main(opt) without return types