def _extract_blob_key(blob):
 if isinstance(blob, str):
  return blob.decode('utf-8')
 elif isinstance(blob, BlobKey):
  return str(blob).decode('utf-8')
 elif (blob.__class__.__name__ == 'BlobInfo'):
  return str(blob.key()).decode('utf-8')
 return blob

def _extract_blob_key ( blob ) : if isinstance ( blob , str ) : return blob . decode ( 'utf-8' ) elif isinstance ( blob , BlobKey ) : return str ( blob ) . decode ( 'utf-8' ) elif ( blob . __class__ . __name__ == 'BlobInfo' ) : return str ( blob . key ( ) ) . decode ( 'utf-8' ) return blob
extract a unicode blob key from a str .