def is_valid_utf8(s):
  if isinstance(s, unicode):
    return True
  try:
    s.decode('utf-8')
    return True
  except __HOLE__:
    return False
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/datastore/datastore_pbs.py/is_valid_utf8