Can we translate python code defined in a tal template

Yeah, I noticed that. Is there any workaround on this?