code: def _read_config(self, attacks):
      if attacks == "all":
          config = [
              (t_a, 1.0 / len(ATTACK_MAP["text"]))
              for t_a in ATTACK_MAP["text"]
          ] + [
              (w_a, 1.0 / len(ATTACK_MAP["word"]))
              for w_a in ATTACK_MAP["word"]
          ]
          return dict(config)
      elif isinstance(attacks, list):
          selected_text_attacks = [
              t_a for t_a in attacks if t_a in ATTACK_MAP["text"]
          ]
          selected_word_attacks = [
              w_a for w_a in attacks if w_a in ATTACK_MAP["word"]
          ]
          config = [
              (t_a, 1.0 / len(selected_text_attacks))
              for t_a in selected_text_attacks
          ] + [
              (w_a, 1.0 / len(selected_word_attacks))
              for w_a in selected_word_attacks
          ]
          return dict(config)
      elif isinstance(attacks, dict):
          return attacks
  
file_path: artificial-adversary/Adversary/adversary.py
imports: from copy import copy
  from functools import partial
  from random import random, seed
  import pandas
  from textblob import TextBlob
  from Adversary.attacks import *
  from Adversary.utils import *
label_desc: Use image node_id 3 for calling the Adversary obj's underlying member method code with example usage: obj._read_config(attacks) and returns: dict, dict, attacks