code: def write_byte(self, value):
          
          if isinstance(value, bytes):
              self.stream.write(value)
          elif isinstance(value, str):
              self.stream.write(value.encode('utf-8'))
          elif isinstance(value, int):
              self.stream.write(bytes([value]))
docs: Write a single byte to the stream.
  
          Args:
              value (bytes, str or int): value to write to the stream.