def __call__(self, tokens, name="render", args="io, **c"):
        """
        from: ${x}
        create:
          def render(io, **context):
              context["x"]
        """
        if isinstance(tokens, Optimized):
            tokens = tokens.tokens
            self.optimized = True

        self.toplevel = self.m.submodule()
        with self.m.def_(name, args):
            self.variables = self.m.submodule()
            self.variables.stmt("write = io.write")
            # self.variables.stmt("get = c.get")
            # self.variables.stmt("M = object()")
            for t in tokens:
                self.visit(t)
        self.optimized = False
        return self.m
def __call__ ( self , tokens , name = "render" , args = "io, **c" ) : if isinstance ( tokens , Optimized ) : tokens = tokens . tokens self . optimized = True self . toplevel = self . m . submodule ( ) with self . m . def_ ( name , args ) : self . variables = self . m . submodule ( ) self . variables . stmt ( "write = io.write" ) for t in tokens : self . visit ( t ) self . optimized = False return self . m
from: ${x}
        create:
          def render(io, **context):
              context["x"]