public static TitanVertex getVertex(TitanTransaction tx, String key, Object value) {
   return (TitanVertex) getOnlyElement(tx.query().has(key, value).vertices(), null);
 }