def boosted_trees_update_ensemble(tree_ensemble_handle, feature_ids, node_ids, gains, thresholds, left_node_contribs, right_node_contribs, max_depth, learning_rate, pruning_mode, name=None):
    "Updates the tree ensemble by either adding a layer to the last tree being grown\n\n  or by starting a new tree.\n\n  Args:\n    tree_ensemble_handle: A `Tensor` of type `resource`.\n      Handle to the ensemble variable.\n    feature_ids: A `Tensor` of type `int32`.\n      Rank 1 tensor with ids for each feature. This is the real id of\n      the feature that will be used in the split.\n    node_ids: A list of `Tensor` objects with type `int32`.\n      List of rank 1 tensors representing the nodes for which this feature\n      has a split.\n    gains: A list with the same length as `node_ids` of `Tensor` objects with type `float32`.\n      List of rank 1 tensors representing the gains for each of the feature's\n      split.\n    thresholds: A list with the same length as `node_ids` of `Tensor` objects with type `int32`.\n      List of rank 1 tensors representing the thesholds for each of the\n      feature's split.\n    left_node_contribs: A list with the same length as `node_ids` of `Tensor` objects with type `float32`.\n      List of rank 2 tensors with left leaf contribs for each of\n      the feature's splits. Will be added to the previous node values to constitute\n      the values of the left nodes.\n    right_node_contribs: A list with the same length as `node_ids` of `Tensor` objects with type `float32`.\n      List of rank 2 tensors with right leaf contribs for each\n      of the feature's splits. Will be added to the previous node values to constitute\n      the values of the right nodes.\n    max_depth: A `Tensor` of type `int32`. Max depth of the tree to build.\n    learning_rate: A `Tensor` of type `float32`.\n      shrinkage const for each new tree.\n    pruning_mode: An `int` that is `>= 0`.\n      0-No pruning, 1-Pre-pruning, 2-Post-pruning.\n    name: A name for the operation (optional).\n\n  Returns:\n    The created Operation.\n  "
    _ctx = _context._context
    if ((_ctx is None) or (not _ctx._eager_context.is_eager)):
        if (not isinstance(node_ids, (list, tuple))):
            raise TypeError(("Expected list for 'node_ids' argument to 'boosted_trees_update_ensemble' Op, not %r." % node_ids))
        _attr_num_features = len(node_ids)
        if (not isinstance(gains, (list, tuple))):
            raise TypeError(("Expected list for 'gains' argument to 'boosted_trees_update_ensemble' Op, not %r." % gains))
        if (len(gains) != _attr_num_features):
            raise ValueError(("List argument 'gains' to 'boosted_trees_update_ensemble' Op with length %d must match length %d of argument 'node_ids'." % (len(gains), _attr_num_features)))
        if (not isinstance(thresholds, (list, tuple))):
            raise TypeError(("Expected list for 'thresholds' argument to 'boosted_trees_update_ensemble' Op, not %r." % thresholds))
        if (len(thresholds) != _attr_num_features):
            raise ValueError(("List argument 'thresholds' to 'boosted_trees_update_ensemble' Op with length %d must match length %d of argument 'node_ids'." % (len(thresholds), _attr_num_features)))
        if (not isinstance(left_node_contribs, (list, tuple))):
            raise TypeError(("Expected list for 'left_node_contribs' argument to 'boosted_trees_update_ensemble' Op, not %r." % left_node_contribs))
        if (len(left_node_contribs) != _attr_num_features):
            raise ValueError(("List argument 'left_node_contribs' to 'boosted_trees_update_ensemble' Op with length %d must match length %d of argument 'node_ids'." % (len(left_node_contribs), _attr_num_features)))
        if (not isinstance(right_node_contribs, (list, tuple))):
            raise TypeError(("Expected list for 'right_node_contribs' argument to 'boosted_trees_update_ensemble' Op, not %r." % right_node_contribs))
        if (len(right_node_contribs) != _attr_num_features):
            raise ValueError(("List argument 'right_node_contribs' to 'boosted_trees_update_ensemble' Op with length %d must match length %d of argument 'node_ids'." % (len(right_node_contribs), _attr_num_features)))
        pruning_mode = _execute.make_int(pruning_mode, 'pruning_mode')
        (_, _, _op) = _op_def_lib._apply_op_helper('BoostedTreesUpdateEnsemble', tree_ensemble_handle=tree_ensemble_handle, feature_ids=feature_ids, node_ids=node_ids, gains=gains, thresholds=thresholds, left_node_contribs=left_node_contribs, right_node_contribs=right_node_contribs, max_depth=max_depth, learning_rate=learning_rate, pruning_mode=pruning_mode, name=name)
        return _op
        _result = None
        return _result
    else:
        try:
            _result = _pywrap_tensorflow.TFE_Py_FastPathExecute(_ctx._context_handle, _ctx._eager_context.device_name, 'BoostedTreesUpdateEnsemble', name, _ctx._post_execution_callbacks, tree_ensemble_handle, feature_ids, node_ids, gains, thresholds, left_node_contribs, right_node_contribs, max_depth, learning_rate, 'pruning_mode', pruning_mode)
            return _result
        except _core._FallbackException:
            return boosted_trees_update_ensemble_eager_fallback(tree_ensemble_handle, feature_ids, node_ids, gains, thresholds, left_node_contribs, right_node_contribs, max_depth, learning_rate, pruning_mode=pruning_mode, name=name, ctx=_ctx)
        except _core._NotOkStatusException as e:
            if (name is not None):
                message = ((e.message + ' name: ') + name)
            else:
                message = e.message
            _six.raise_from(_core._status_to_exception(e.code, message), None)
Updates the tree ensemble by either adding a layer to the last tree being grown

or by starting a new tree.

Args:
  tree_ensemble_handle: A `Tensor` of type `resource`.
    Handle to the ensemble variable.
  feature_ids: A `Tensor` of type `int32`.
    Rank 1 tensor with ids for each feature. This is the real id of
    the feature that will be used in the split.
  node_ids: A list of `Tensor` objects with type `int32`.
    List of rank 1 tensors representing the nodes for which this feature
    has a split.
  gains: A list with the same length as `node_ids` of `Tensor` objects with type `float32`.
    List of rank 1 tensors representing the gains for each of the feature's
    split.
  thresholds: A list with the same length as `node_ids` of `Tensor` objects with type `int32`.
    List of rank 1 tensors representing the thesholds for each of the
    feature's split.
  left_node_contribs: A list with the same length as `node_ids` of `Tensor` objects with type `float32`.
    List of rank 2 tensors with left leaf contribs for each of
    the feature's splits. Will be added to the previous node values to constitute
    the values of the left nodes.
  right_node_contribs: A list with the same length as `node_ids` of `Tensor` objects with type `float32`.
    List of rank 2 tensors with right leaf contribs for each
    of the feature's splits. Will be added to the previous node values to constitute
    the values of the right nodes.
  max_depth: A `Tensor` of type `int32`. Max depth of the tree to build.
  learning_rate: A `Tensor` of type `float32`.
    shrinkage const for each new tree.
  pruning_mode: An `int` that is `>= 0`.
    0-No pruning, 1-Pre-pruning, 2-Post-pruning.
  name: A name for the operation (optional).

Returns:
  The created Operation.
def boosted_trees_update_ensemble(tree_ensemble_handle, feature_ids, node_ids, gains, thresholds, left_node_contribs, right_node_contribs, max_depth, learning_rate, pruning_mode, name=None):
    "Updates the tree ensemble by either adding a layer to the last tree being grown\n\n  or by starting a new tree.\n\n  Args:\n    tree_ensemble_handle: A `Tensor` of type `resource`.\n      Handle to the ensemble variable.\n    feature_ids: A `Tensor` of type `int32`.\n      Rank 1 tensor with ids for each feature. This is the real id of\n      the feature that will be used in the split.\n    node_ids: A list of `Tensor` objects with type `int32`.\n      List of rank 1 tensors representing the nodes for which this feature\n      has a split.\n    gains: A list with the same length as `node_ids` of `Tensor` objects with type `float32`.\n      List of rank 1 tensors representing the gains for each of the feature's\n      split.\n    thresholds: A list with the same length as `node_ids` of `Tensor` objects with type `int32`.\n      List of rank 1 tensors representing the thesholds for each of the\n      feature's split.\n    left_node_contribs: A list with the same length as `node_ids` of `Tensor` objects with type `float32`.\n      List of rank 2 tensors with left leaf contribs for each of\n      the feature's splits. Will be added to the previous node values to constitute\n      the values of the left nodes.\n    right_node_contribs: A list with the same length as `node_ids` of `Tensor` objects with type `float32`.\n      List of rank 2 tensors with right leaf contribs for each\n      of the feature's splits. Will be added to the previous node values to constitute\n      the values of the right nodes.\n    max_depth: A `Tensor` of type `int32`. Max depth of the tree to build.\n    learning_rate: A `Tensor` of type `float32`.\n      shrinkage const for each new tree.\n    pruning_mode: An `int` that is `>= 0`.\n      0-No pruning, 1-Pre-pruning, 2-Post-pruning.\n    name: A name for the operation (optional).\n\n  Returns:\n    The created Operation.\n  "
    _ctx = _context._context
    if ((_ctx is None) or (not _ctx._eager_context.is_eager)):
        if (not isinstance(node_ids, (list, tuple))):
            raise TypeError(("Expected list for 'node_ids' argument to 'boosted_trees_update_ensemble' Op, not %r." % node_ids))
        _attr_num_features = len(node_ids)
        if (not isinstance(gains, (list, tuple))):
            raise TypeError(("Expected list for 'gains' argument to 'boosted_trees_update_ensemble' Op, not %r." % gains))
        if (len(gains) != _attr_num_features):
            raise ValueError(("List argument 'gains' to 'boosted_trees_update_ensemble' Op with length %d must match length %d of argument 'node_ids'." % (len(gains), _attr_num_features)))
        if (not isinstance(thresholds, (list, tuple))):
            raise TypeError(("Expected list for 'thresholds' argument to 'boosted_trees_update_ensemble' Op, not %r." % thresholds))
        if (len(thresholds) != _attr_num_features):
            raise ValueError(("List argument 'thresholds' to 'boosted_trees_update_ensemble' Op with length %d must match length %d of argument 'node_ids'." % (len(thresholds), _attr_num_features)))
        if (not isinstance(left_node_contribs, (list, tuple))):
            raise TypeError(("Expected list for 'left_node_contribs' argument to 'boosted_trees_update_ensemble' Op, not %r." % left_node_contribs))
        if (len(left_node_contribs) != _attr_num_features):
            raise ValueError(("List argument 'left_node_contribs' to 'boosted_trees_update_ensemble' Op with length %d must match length %d of argument 'node_ids'." % (len(left_node_contribs), _attr_num_features)))
        if (not isinstance(right_node_contribs, (list, tuple))):
            raise TypeError(("Expected list for 'right_node_contribs' argument to 'boosted_trees_update_ensemble' Op, not %r." % right_node_contribs))
        if (len(right_node_contribs) != _attr_num_features):
            raise ValueError(("List argument 'right_node_contribs' to 'boosted_trees_update_ensemble' Op with length %d must match length %d of argument 'node_ids'." % (len(right_node_contribs), _attr_num_features)))
        pruning_mode = _execute.make_int(pruning_mode, 'pruning_mode')
        (_, _, _op) = _op_def_lib._apply_op_helper('BoostedTreesUpdateEnsemble', tree_ensemble_handle=tree_ensemble_handle, feature_ids=feature_ids, node_ids=node_ids, gains=gains, thresholds=thresholds, left_node_contribs=left_node_contribs, right_node_contribs=right_node_contribs, max_depth=max_depth, learning_rate=learning_rate, pruning_mode=pruning_mode, name=name)
        return _op
        _result = None
        return _result
    else:
        try:
            _result = _pywrap_tensorflow.TFE_Py_FastPathExecute(_ctx._context_handle, _ctx._eager_context.device_name, 'BoostedTreesUpdateEnsemble', name, _ctx._post_execution_callbacks, tree_ensemble_handle, feature_ids, node_ids, gains, thresholds, left_node_contribs, right_node_contribs, max_depth, learning_rate, 'pruning_mode', pruning_mode)
            return _result
        except _core._FallbackException:
            return boosted_trees_update_ensemble_eager_fallback(tree_ensemble_handle, feature_ids, node_ids, gains, thresholds, left_node_contribs, right_node_contribs, max_depth, learning_rate, pruning_mode=pruning_mode, name=name, ctx=_ctx)
        except _core._NotOkStatusException as e:
            if (name is not None):
                message = ((e.message + ' name: ') + name)
            else:
                message = e.message
            _six.raise_from(_core._status_to_exception(e.code, message), None)