def _make_predictions_dict(stamp, logits, partition_ids, ensemble_stats, used_handlers, leaf_index=None):
    'Returns predictions for the given logits and n_classes.\n\n  Args:\n    stamp: The ensemble stamp.\n    logits: A rank 2 `Tensor` with shape [batch_size, n_classes - 1]. that\n      contains predictions when no dropout was applied.\n    partition_ids: A rank 1 `Tensor` with shape [batch_size].\n    ensemble_stats: A TreeEnsembleStatsOp result tuple.\n    used_handlers: A TreeEnsembleUsedHandlerOp result tuple of an int and a\n      boolean mask.\n    leaf_index: A rank 2 `Tensor` with shape [batch_size, number of trees]. that\n      contains leaf id for each example prediction.\n\n  Returns:\n    A dict of predictions.\n  '
    result = {}
    result[ENSEMBLE_STAMP] = stamp
    result[PREDICTIONS] = logits
    result[PARTITION_IDS] = partition_ids
    result[NUM_LAYERS_ATTEMPTED] = ensemble_stats.attempted_layers
    result[NUM_TREES_ATTEMPTED] = ensemble_stats.attempted_trees
    result[NUM_USED_HANDLERS] = used_handlers.num_used_handlers
    result[USED_HANDLERS_MASK] = used_handlers.used_handlers_mask
    if (leaf_index is not None):
        result[LEAF_INDEX] = leaf_index
    return result
Returns predictions for the given logits and n_classes.

Args:
  stamp: The ensemble stamp.
  logits: A rank 2 `Tensor` with shape [batch_size, n_classes - 1]. that
    contains predictions when no dropout was applied.
  partition_ids: A rank 1 `Tensor` with shape [batch_size].
  ensemble_stats: A TreeEnsembleStatsOp result tuple.
  used_handlers: A TreeEnsembleUsedHandlerOp result tuple of an int and a
    boolean mask.
  leaf_index: A rank 2 `Tensor` with shape [batch_size, number of trees]. that
    contains leaf id for each example prediction.

Returns:
  A dict of predictions.
def _make_predictions_dict(stamp, logits, partition_ids, ensemble_stats, used_handlers, leaf_index=None):
    'Returns predictions for the given logits and n_classes.\n\n  Args:\n    stamp: The ensemble stamp.\n    logits: A rank 2 `Tensor` with shape [batch_size, n_classes - 1]. that\n      contains predictions when no dropout was applied.\n    partition_ids: A rank 1 `Tensor` with shape [batch_size].\n    ensemble_stats: A TreeEnsembleStatsOp result tuple.\n    used_handlers: A TreeEnsembleUsedHandlerOp result tuple of an int and a\n      boolean mask.\n    leaf_index: A rank 2 `Tensor` with shape [batch_size, number of trees]. that\n      contains leaf id for each example prediction.\n\n  Returns:\n    A dict of predictions.\n  '
    result = {}
    result[ENSEMBLE_STAMP] = stamp
    result[PREDICTIONS] = logits
    result[PARTITION_IDS] = partition_ids
    result[NUM_LAYERS_ATTEMPTED] = ensemble_stats.attempted_layers
    result[NUM_TREES_ATTEMPTED] = ensemble_stats.attempted_trees
    result[NUM_USED_HANDLERS] = used_handlers.num_used_handlers
    result[USED_HANDLERS_MASK] = used_handlers.used_handlers_mask
    if (leaf_index is not None):
        result[LEAF_INDEX] = leaf_index
    return result