<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def guess_backend(identifier):
 """ guess the backend from a given identifier string for the device """

    if identifier.startswith('usb://') or identifier.startswith('0x'):
        return 'pyusb'
    elif identifier.startswith('file://') or identifier.startswith('/dev/usb/') or identifier.startswith('lp'):
        return 'linux_kernel'
    elif identifier.startswith('tcp://'):
        return 'network'
    else:
        raise ValueError('Cannot guess backend for given identifier: %s' % identifier)