code: def write_short(self, n):
          
          if n < 0 or n > 65535:
              raise FrameSyntaxError(
                  'Octet {0!r} out of range 0..65535'.format(n))
          self._flushbits()
          self.out.write(pack('>H', int(n)))
docs: Write an integer as an unsigned 16-bit value.