def is_serial_available(serial_port):
    state = False
    serial = pyserial.Serial()
    serial.port = serial_port
    try:
        serial.open()
    except pyserial.serialutil.SerialException:
        pass
    except __HOLE__:
        pass
    else:
        if serial.isOpen():
            state = True
            serial.close()
    return state
dataset/ETHPy150Open Robot-Will/Stino/stino/pyarduino/base/serial_monitor.py/is_serial_available