def METHOD_NAME():
    with nimodinst.Session('') as session:
        device = len(session) + 1
        try:
            session.devices[device].slot_number
            assert False
        except IndexError:
            pass