def METHOD_NAME(self):
    if self.com_port is None:
        print("Serial port init error: COM port is unset.")
        return
    try:
        import serial
        self.connection = serial.Serial(self.com_port, baudrate=self.baud_rate, timeout=0)
        print("Connection to port {} opened.".format(self.com_port))
        Publisher.sendMessage('Serial port connection', state=True)
    except:
        print("Serial port init error: Connecting to port {} failed.".format(self.com_port))