code: def timeout(self, value):
          
          self.check_pyb()
          try:
              self.pyb.serial.timeout = value
          except:
              # timeout is a property so it calls code, and that can fail
              # if the serial port is closed.
              pass
docs: Sets the timeout associated with the serial port.