def METHOD_NAME(params, tree_config, stats_handle, name, container=None):
  r"""Creates a tree model and returns a handle to it.
  Args:
    params: A TensorForestParams object.
    tree_config: A `Tensor` of type `string`. Serialized proto of the tree.
    stats_handle: Resource handle to the stats object.
    name: A name for the variable.
    container: An optional `string`. Defaults to `""`.
  Returns:
    A `Tensor` of type mutable `string`. The handle to the tree.
  """
  with ops.name_scope(name, "TreeVariable") as name:
    tree_var = TreeVariable(params, tree_config, stats_handle, name, container)
    resource_handle = tree_var.resource_handle
    create_op = tree_var.initializer
    is_initialized_op = tree_var.is_initialized()
    # Adds the variable to the savable list.
    saveable = tree_var._gather_saveables_for_checkpoint()["tree_variable"](  # pylint: disable=protected-access
        name=resource_handle.name)
    ops.add_to_collection(ops.GraphKeys.SAVEABLE_OBJECTS, saveable)
    resources.register_resource(resource_handle, create_op, is_initialized_op)
    return resource_handle