Lazy initialization of data necessary to execute defenses.

def fetch_defense_data(self):
    """Lazy initialization of data necessary to execute defenses."""
    if self.defenses_data_initialized:
      return
    logging.info('Fetching defense data from datastore')
    # init data from datastore
    self.submissions.init_from_datastore()
    self.dataset_batches.init_from_datastore()
    self.adv_batches.init_from_datastore()
    # read dataset metadata
    self.read_dataset_metadata()
    # mark as initialized
    self.defenses_data_initialized = True