code: def show_results(self, img, results):
      img_cp = img.copy()
      if self.filewrite_txt:
          ftxt = open(self.tofile_txt, "w")
      class_results_set = set()
      for i in range(len(results)):
          x = int(results[i][1])
          y = int(results[i][2])
          w = int(results[i][3]) // 2
          h = int(results[i][4]) // 2
          class_results_set.add(results[i][0])
          if self.disp_console:
              print(
                  "    class : "
                  + results[i][0]
                  + " , [x,y,w,h]=["
                  + str(x)
                  + ","
                  + str(y)
                  + ","
                  + str(int(results[i][3]))
                  + ","
                  + str(int(results[i][4]))
                  + "], Confidence = "
                  + str(results[i][5])
              )
  
          if self.filewrite_img or self.imshow:
              cv2.rectangle(
                  img_cp, (x - w, y - h), (x + w, y + h), (0, 255, 0), 2
              )
              cv2.rectangle(
                  img_cp,
                  (x - w, y - h - 20),
                  (x + w, y - h),
                  (125, 125, 125),
                  -1,
              )
              cv2.putText(
                  img_cp,
                  results[i][0] + " : %.2f" % results[i][5],
                  (x - w + 5, y - h - 7),
                  cv2.FONT_HERSHEY_SIMPLEX,
                  0.5,
                  (0, 0, 0),
                  1,
              )
  
          if self.filewrite_txt:
              ftxt.write(
                  results[i][0]
                  + ","
                  + str(x)
                  + ","
                  + str(y)
                  + ","
                  + str(w)
                  + ","
                  + str(h)
                  + ","
                  + str(results[i][5])
                  + "\n"
              )
      # suppose we want to know how attack performs on class "person"
      if "person" not in class_results_set:
          self.success += 1
          print("Attack succeeded!")
      else:
          print("Attack failed!")
  
      if self.filewrite_img:
          if self.disp_console:
              print("image file writed : " + self.tofile_img)
          cv2.imwrite(self.tofile_img, img_cp)
  
      if self.filewrite_txt:
          if self.disp_console:
              print("txt file writed : " + self.tofile_txt)
          ftxt.close()
  
      if self.imshow:
          cv2.imshow("detection display", img_cp)
          cv2.waitKey(1)
  
imports: from __future__ import division
  from __future__ import print_function
  from builtins import str
  from builtins import range
  from past.utils import old_div
  import numpy
  import cv2
  import tensorflow
  import time
  import os
  from EOT_simulation import transformation
  from attack_methods.base_logic import ODD_logic
  import pdb
label_desc: Use image node_id 8 for calling the EOTB_attack obj's underlying member method code with example usage: obj.show_results(img, results) without return types