def fill_placeholders(self, tags):
        """Substitute Placeholder nodes by its value in tags"""
        def change_p_node_tags(node, children):
            if isinstance(node, Placeholder):
                value = ConstExpr(tags[node.name])
                return value
            else:
                return node.clone(children)

        return map_tree(change_p_node_tags, self)
def fill_placeholders ( self , tags ) : def change_p_node_tags ( node , children ) : if isinstance ( node , Placeholder ) : value = ConstExpr ( tags [ node . name ] ) return value else : return node . clone ( children ) return map_tree ( change_p_node_tags , self )
Substitute Placeholder nodes by its value in tags