code: def forFrame(
      frame_number, output_array, output_count, returned_frame
  ):
      plt.clf()
  
      this_colors = []
      labels = []
      sizes = []
  
      counter = 0
  
      for eachItem in output_count:
          counter += 1
          labels.append(eachItem + " = " + str(output_count[eachItem]))
          sizes.append(output_count[eachItem])
          this_colors.append(color_index[eachItem])
  
      global resized
  
      if resized == False:
          manager = plt.get_current_fig_manager()
          manager.resize(width=1000, height=500)
          resized = True
  
      plt.subplot(1, 2, 1)
      plt.title("Frame : " + str(frame_number))
      plt.axis("off")
      plt.imshow(returned_frame, interpolation="none")
  
      plt.subplot(1, 2, 2)
      plt.title("Analysis: " + str(frame_number))
      plt.pie(
          sizes,
          labels=labels,
          colors=this_colors,
          shadow=True,
          startangle=140,
          autopct="%1.1f%%",
      )
  
      plt.pause(0.01)
  
label_desc: Use image node_id 1 for calling a global function with example usage: forFrame(frame_number, output_array, output_count, returned_frame) without return types