code: def __callback (self, img):
          '''
          Callback function to receive and save Images. 
  
          @param img: ROS Image received
          
          @type img: sensor_msgs.msg.Image
  
          '''
          image = imageMsg2Image(img, self.bridge)
  
          self.lock.acquire()
          self.data = image
          self.lock.release(f __callback (self, img):
          '''
          Callback function to receive and save Images. 
  
          @param img: ROS Image received
          
          @type img: sensor_msgs.msg.Image
  
          '''
          image = imageMsg2Image(img, self.bridge)
  
          self.lock.acquire()
          self.data = image
          self.lock.release()
docs: Callback function to receive and save Images. 
  
          @param img: ROS Image received
          
          @type img: sensor_msgs.msg.Image