code: def set_baudrate(self, baudrate):
          '''set baudrate'''
          try:
              self.port.setBaudrate(baudrate)
          except Exception:
              # for pySerial 3.0, which doesn't have setBaudrate()
              self.port.baudrate = baudratf set_baudrate(self, baudrate):
          '''set baudrate'''
          try:
              self.port.setBaudrate(baudrate)
          except Exception:
              # for pySerial 3.0, which doesn't have setBaudrate()
              self.port.baudrate = baudrate
docs: set baudrate