def METHOD_NAME(self, data):
    """
    Callback that processes the input data and publishes to the corresponding topics.
    :param data: input message
    :type data: sensor_msgs.msg.Image
    """
    # Convert sensor_msgs.msg.Image into OpenDR Image
    image = self.bridge.from_ros_image(data, encoding='bgr8')
    # Run object detection
    boxes = self.object_detector.infer(image)
    if self.object_publisher is not None:
        # Publish detections in ROS message
        ros_boxes = self.bridge.to_ros_bounding_box_list(boxes)  # Convert to ROS bounding_box_list
        self.object_publisher.publish(ros_boxes)
    if self.image_publisher is not None:
        # Get an OpenCV image back
        image = image.opencv()
        # Annotate image with object detection boxes
        image = draw_bounding_boxes(image, boxes, class_names=self.object_detector.classes, line_thickness=3)
        # Convert the annotated OpenDR image to ROS2 image message using bridge and publish it
        self.image_publisher.publish(self.bridge.to_ros_image(Image(image), encoding='bgr8'))