class_docstr: Class which encapsulates logit of the master.
docstr: Prepares all data needed for evaluation of attacks.
code: def prepare_attacks(self):
      """Prepares all data needed for evaluation of attacks."""
      print_header("PREPARING ATTACKS DATA")
      # verify that attacks data not written yet
      if not self.ask_when_work_is_populated(self.attack_work):
          return
      self.attack_work = eval_lib.AttackWorkPieces(
          datastore_client=self.datastore_client
      )
      # prepare submissions
      print_header("Initializing submissions")
      self.submissions.init_from_storage_write_to_datastore()
      if self.verbose:
          print(self.submissions)
      # prepare dataset batches
      print_header("Initializing dataset batches")
      self.dataset_batches.init_from_storage_write_to_datastore(
          batch_size=self.batch_size,
          allowed_epsilon=ALLOWED_EPS,
          skip_image_ids=[],
          max_num_images=self.max_dataset_num_images,
      )
      if self.verbose:
          print(self.dataset_batches)
      # prepare adversarial batches
      print_header("Initializing adversarial batches")
      self.adv_batches.init_from_dataset_and_submissions_write_to_datastore(
          dataset_batches=self.dataset_batches,
          attack_submission_ids=self.submissions.get_all_attack_ids(),
      )
      if self.verbose:
          print(self.adv_batches)
      # prepare work pieces
      print_header("Preparing attack work pieces")
      self.attack_work.init_from_adversarial_batches(
          self.adv_batches.data
      )
      self.attack_work.write_all_to_datastore()
      if self.verbose:
          print(self.attack_work)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import collections
  from collections import defaultdict
  import csv
  from io import BytesIO
  import logging
  import os
  import pickle
  import random
  import time
  from six import iteritems
  from six import iterkeys
  from six import itervalues
  from six.moves import input
  import eval_lib
label_desc: Use image node_id 3 for calling the EvaluationMaster obj's underlying member method code with example usage: obj.prepare_attacks() without return types