code: def write_short_ascii(s):
      
      if s is None:
          return _NULL_SHORT_STRING
      if not isinstance(s, string_types):
          raise TypeError('{!r} is not text'.format(s))
      return write_short_bytes(s.encode('ascii'))
docs: Encode a Kafka short string which represents text.
  
      :param str s:
          Text string (`str` on Python 3, `str` or `unicode` on Python 2) or
          ``None``. The string will be ASCII-encoded.
  
      :returns: length-prefixed `bytes`
      :raises:
          `struct.error` for strings longer than 32767 characters