code: public Batch newBatch(String keyName1, String keyName2) {
      // [START newBatch]
      Key key1 = datastore.newKeyFactory().setKind("MyKind").newKey(keyName1);
      Key key2 = datastore.newKeyFactory().setKind("MyKind").newKey(keyName2);
      Batch batch = datastore.newBatch();
      Entity entity1 = Entity.newBuilder(key1).set("name", "John").build();
      Entity entity2 = Entity.newBuilder(key2).set("title", "title").build();
      batch.add(entity1);
      batch.add(entity2);
      batch.submit();
      // [END newBatch]
      return batch;
    }
docs: [VARIABLE "my_key_name_2"]