code: def bytes_(s, encoding='utf-8', errors='strict'):
      
      if isinstance(s, text_type):  # pragma: no cover
          return s.encode(encoding, errors)
      return s
docs: If ``s`` is an instance of ``text_type``, return
      ``s.encode(encoding, errors)``, otherwise return ``s``