def METHOD_NAME(self, imgcap_connection):
    # exit immediately if imgcap_connection is invalid
    if imgcap_connection is None:
        print("image_capture failed because pipe is uninitialised")
        return
    # open the camera
    camera = self.get_camera()
    # clear latest image
    latest_image = None
    while True:
        # constantly get the image from the webcam
        success_flag, image=camera.read()
        # if successful overwrite our latest image
        if success_flag:
            latest_image = image
        # check if the parent wants the image
        if imgcap_connection.poll():
            recv_obj = imgcap_connection.recv()
            # if -1 is received we exit
            if recv_obj == -1:
                break
            # otherwise we return the latest image
            imgcap_connection.send(latest_image)
    # release camera when exiting
    camera.release()