code: public static Key ancestor(Key key) {
  		Key ancestor = key;
  		
  		while (ancestor.getParent() != null) {
  			ancestor = ancestor.getParent();
  		}
  		
  		return ancestor;
  	}
docs: Gets ancestor {@code Key} from the specified {@code Key}.
  
  @param key The {@code Key} of the specified entity.
  @return Ancestor {@code Key} of the specified {@code Key}.