def open_napalm_connection(device):
    'Funtion to open napalm connection and return connection object'
    device = device.copy()
    platform = device.pop('platform')
    driver = get_network_driver(platform)
    conn = driver(**device)
    conn.open()
    return conn
Funtion to open napalm connection and return connection object
def open_napalm_connection(device):
    
    device = device.copy()
    platform = device.pop('platform')
    driver = get_network_driver(platform)
    conn = driver(**device)
    conn.open()
    return conn