def _find_endpoints(self, interface, setting):
    (recv, send) = setting
    if (recv is None):
        recv = find_endpoint(interface, usb.ENDPOINT_IN, usb.ENDPOINT_TYPE_BULK)
    else:
        recv = usb_find_desc(interface, bEndpointAddress=recv)
    if (send is None):
        send = find_endpoint(interface, usb.ENDPOINT_OUT, usb.ENDPOINT_TYPE_BULK)
    else:
        send = usb_find_desc(interface, bEndpointAddress=send)
    return (recv, send)
def _find_endpoints(self, interface, setting):
    (recv, send) = setting
    if (recv is None):
        recv = find_endpoint(interface, usb.ENDPOINT_IN, usb.ENDPOINT_TYPE_BULK)
    else:
        recv = usb_find_desc(interface, bEndpointAddress=recv)
    if (send is None):
        send = find_endpoint(interface, usb.ENDPOINT_OUT, usb.ENDPOINT_TYPE_BULK)
    else:
        send = usb_find_desc(interface, bEndpointAddress=send)
    return (recv, send)