'Convert optree to list of lists recursively.'

@staticmethod
def optree_to_list(optree):

    if isinstance(optree, OpTreeNode):
        return list(map(OpTreeNode.optree_to_list, optree))
    else:
        return optree
