def visit_list(self, node, *args, **kwargs):
        """As transformers may return lists in some places this method
        can be used to enforce a list as return value.
        """
        rv = self.visit(node, *args, **kwargs)
        if not isinstance(rv, list):
            rv = [rv]
        return rv
def visit_list ( self , node , * args , ** kwargs ) : rv = self . visit ( node , * args , ** kwargs ) if not isinstance ( rv , list ) : rv = [ rv ] return rv
As transformers may return lists in some places this method
        can be used to enforce a list as return value.