code: def _str(val):
      
      if str == bytes:
          if isinstance(val, str):
              return val
          else:
              return str(val)
      else:
          if isinstance(val, str):
              return val
          else:
              return str(val, 'ascii')
docs: Ensures that the val is the default str() type for python2 or 3