<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def exec(self, globals=None, locals=None):
 """ Execute simple code blocks. Do not attempt this on modules or other blocks where you have imports as they won't work. Instead write the code to a file and use runpy.run_path() """

        if locals is None:
            locals = {}
        builtins.exec(self.to_code(), globals, locals)
        return locals