def ensure_text(str_or_bytes, encoding='<STR_LIT:utf-8>'):
if not isinstance(str_or_bytes, six.text_type):<EOL><INDENT>return str_or_bytes.decode(encoding)<EOL><DEDENT>return str_or_bytes<EOL>
Ensures an input is a string, decoding if it is bytes.