code: def load_defense_output(filename):
      """Loads output of defense from given file."""
      result = {}
      with open(filename) as f:
          for row in csv.reader(f):
              try:
                  image_filename = row[0]
                  if image_filename.endswith(
                      ".png"
                  ) or image_filename.endswith(".jpg"):
                      image_filename = image_filename[
                          : image_filename.rfind(".")
                      ]
                  label = int(row[1])
              except (IndexError, ValueError):
                  continue
              result[image_filename] = label
      return result
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import csv
  import json
  import os
  import subprocess
  import numpy
  from PIL import Image
label_desc: Use image node_id 3 for calling a global function with example usage: load_defense_output(filename) and returns: result