def _from_bytes(value):
 result = (value.decode('utf-8') if isinstance(value, six.binary_type) else value)
 if isinstance(result, six.text_type):
  return result
 else:
  raise ValueError('{0!r} could not be converted to unicode'.format(value))

def _from_bytes ( value ) : result = ( value . decode ( 'utf-8' ) if isinstance ( value , six . binary_type ) else value ) if isinstance ( result , six . text_type ) : return result else : raise ValueError ( '{0!r} could not be converted to unicode' . format ( value ) )
converts bytes to a string value .