code: def on_usb_device_detach(self, id_p, error):
          
          if not isinstance(id_p, basestring):
              raise TypeError("id_p can only be an instance of type basestring")
          if not isinstance(error, IVirtualBoxErrorInfo):
              raise TypeError("error can only be an instance of type IVirtualBoxErrorInfo")
          self._call("onUSBDeviceDetach",
                       in_p=[id_p, error])
docs: Triggered when a request to release the USB device (as a result
          of machine termination or direct call to
          :py:func:`IConsole.detach_usb_device` ) has completed.
          A @c null @a error object means success, otherwise it
          describes a failure.
  
          in id_p of type str
  
          in error of type :class:`IVirtualBoxErrorInfo`
  
          raises :class:`VBoxErrorInvalidVmState`
              Session state prevents operation.
          
          raises :class:`VBoxErrorInvalidObjectState`
              Session type prevents operation.