code: def update(self):
      # keep looping infinitely
      while True:
          # if the thread indicator variable is set, stop the
          # thread
          if self.stopped:
              break
  
          # otherwise, ensure the queue has room in it
          if not self.Q.full():
              # read the next frame from the file
              (grabbed, frame) = self.stream.read()
  
              # if the `grabbed` boolean is `False`, then we have
              # reached the end of the video file
              if not grabbed:
                  self.stopped = True
  
              # if there are transforms to be done, might as well
              # do them on producer thread before handing back to
              # consumer thread. ie. Usually the producer is so far
              # ahead of consumer that we have time to spare.
              #
              # Python is not parallel but the transform operations
              # are usually OpenCV native so release the GIL.
              #
              # Really just trying to avoid spinning up additional
              # native threads and overheads of additional
              # producer/consumer queues since this one was generally
              # idle grabbing frames.
              if self.transform:
                  frame = self.transform(frame)
  
              # add the frame to the queue
              self.Q.put(frame)
          else:
              time.sleep(0.1)  # Rest for 10ms, we have a full queue
  
      self.stream.release()
  
file_path: imutils/imutils/video/filevideostream.py
imports: from threading import Thread
  import sys
  import cv2
  import time
label_desc: Use image node_id 3 for calling the FileVideoStream obj's underlying member method code with example usage: obj.update() without return types