code: def write_image(self, img, im_name, stream=None):
      if self.opt.vis:
          cv2.imshow("AlphaPose Demo", img)
          cv2.waitKey(30)
      if self.opt.save_img:
          cv2.imwrite(
              os.path.join(self.opt.outputpath, "vis", im_name), img
          )
      if self.save_video:
          stream.write(img)
  
imports: import os
  import time
  from queue import Queue
  from threading import Thread
  import cv2
  import numpy
  import torch
  import torch.multiprocessing
  from alphapose.utils.pPose_nms import pose_nms, write_json
  from alphapose.utils.transforms import get_func_heatmap_to_coord
  import norfair
label_desc: Use image node_id 5 for calling the DataWriter obj's underlying member method code with example usage: obj.write_image(img, im_name, stream) without return types