(optree)
Convert optree to list of lists recursively.
Convert optree to list of lists recursively.
Convert optree to list of lists recursively .
def optree_to_list(optree):
        """
        Convert optree to list of lists recursively.
        """
        if isinstance(optree, OpTreeNode):
            return list(map(OpTreeNode.optree_to_list, optree))
        else:
            return optree
def optree_to_list ( optree ) : if isinstance ( optree , OpTreeNode ) : return list ( map ( OpTreeNode . optree_to_list , optree ) ) else : return optree