code: def _try_open(cls):
      
      handle = None
      for usb_cls, subcls, protocol in [(adb_device.CLASS,
                                         adb_device.SUBCLASS,
                                         adb_device.PROTOCOL),
                                        (fastboot_device.CLASS,
                                         fastboot_device.SUBCLASS,
                                         fastboot_device.PROTOCOL)]:
        try:
          handle = local_usb.LibUsbHandle.open(
              serial_number=cls.serial_number,
              interface_class=usb_cls,
              interface_subclass=subcls,
              interface_protocol=protocol)
          cls.serial_number = handle.serial_number
          return True
        except usb_exceptions.DeviceNotFoundError:
          pass
        except usb_exceptions.MultipleInterfacesFoundError:
          _LOG.warning('Multiple Android devices found, ignoring!')
        finally:
          if handle:
            handle.close()
      return False
docs: Try to open a USB handle.