def bytes_(s, encoding='latin-1', errors='strict'):
 if isinstance(s, text_type):
  return s.encode(encoding, errors)
 return s

def bytes_ ( s , encoding = 'latin-1' , errors = 'strict' ) : if isinstance ( s , text_type ) : return s . encode ( encoding , errors ) return s
if s is an instance of text_type .