in usb_monitor_pkg/usb_monitor_pkg/usb_monitor_node.py [0:0]
def main(args=None):
rclpy.init(args=args)
with USBMonitorNode() as usb_monitor_node:
executor = MultiThreadedExecutor()
rclpy.spin(usb_monitor_node, executor)
# Destroy the node explicitly
# (optional - otherwise it will be done automatically
# when the garbage collector destroys the node object)
usb_monitor_node.destroy_node()
rclpy.shutdown()