def utf8_decode(value):
 if isinstance(value, six.binary_type):
  return _utf8_decoder(value)[0]
 return six.text_type(value)

def utf8_decode ( value ) : if isinstance ( value , six . binary_type ) : return _utf8_decoder ( value ) [ 0 ] return six . text_type ( value )
decode a from utf-8 into unicode .