code: def as_text_type(s):
      if PY3 and isinstance(s, bytes):
          return s.decode("ascii")
      return s
  
imports: from unittest import TestCase
  from simplejson.compat import StringIO, long_type, b, binary_type, text_type, PY3
  import simplejson
label_desc: Use image node_id 1 for calling a global function with example usage: as_text_type(s) and returns: s, s