code: public List<Key> batchAllocateId() {
      // [START batchAllocateId]
      KeyFactory keyFactory = datastore.newKeyFactory().setKind("MyKind");
      IncompleteKey incompleteKey1 = keyFactory.newKey();
      IncompleteKey incompleteKey2 = keyFactory.newKey();
  
      // let cloud datastore automatically assign the ids
      List<Key> keys = datastore.allocateId(incompleteKey1, incompleteKey2);
      // [END batchAllocateId]
      return keys;
    }
docs: [TARGET allocateId(IncompleteKey...)]