code: def _encode_status(status):
          
          if six.PY2:
              return status
          if not isinstance(status, str):
              raise TypeError('WSGI response status is not of type str.')
          return status.encode('ISO-8859-1')
docs: Cast status to bytes representation of current Python version.
  
          According to :pep:`3333`, when using Python 3, the response status
          and headers must be bytes masquerading as unicode; that is, they
          must be of type "str" but are restricted to code points in the
          "latin-1" set.