def decision_list(n_leaves):
    """
    Create a decision list
    """
    def _list(leaves):
        if len(leaves) == 2:
            return (leaves[0], leaves[1])
        else:
            return (leaves[0], _list(leaves[1:]))
    return _list(np.arange(n_leaves))
Create a decision list