code: def _utf8str(x):
    
    if six.PY3:
      return str(x)
    if isinstance(x, six.binary_type):
      return x
    elif isinstance(x, six.text_type):
      return x.encode('utf-8')
    else:
      return six.binary_type(x)
docs: Like str(x), but returns UTF8.