How can a openmv tell if it is connected to a port PC?

I made an application through which I configure the camera settings (through rpc.rpc_usb_vcp_slave()). When disconnected from usb, the camera should work independently.

class USB_VCP – USB virtual comm port — MicroPython 1.23 documentation (openmv.io)

Thank you, I solved the issue via USB_VCP.isconnected