code: def saveLastScreenImage(self):
          
          bitmap = self.getLastScreenImage()
          _, target_file = tempfile.mkstemp(".png")
          cv2.imwrite(target_file, bitmap)
docs: Saves the last image taken on this region's screen to a temporary file