<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def init(opts=None):
    '''
    Required.
    Initialize device connection using ssh or nxapi connection type.
    '''
    global CONNECTION
    if __opts__.get('proxy').get('connection') is not None:
        CONNECTION = __opts__.get('proxy').get('connection')

    if CONNECTION == 'ssh':
        log.info('NXOS PROXY: Initialize ssh proxy connection')
        return _init_ssh(opts)
    elif CONNECTION == 'nxapi':
        log.info('NXOS PROXY: Initialize nxapi proxy connection')
        return _init_nxapi(opts)
    else:
        log.error('Unknown Connection Type: %s', CONNECTION)
        return False