code: private void createIncompleteKey(Key parent) {
      String kind = entityMetadata.getKind();
      if (parent == null) {
        key = entityManager.newNativeKeyFactory().setKind(kind).newKey();
      } else {
        key = IncompleteKey.newBuilder(parent, kind).build();
      }
    }
docs: Creates an IncompleteKey.
  
  @param parent
  the parent key, may be <code>null</code>.