<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def runctx(self, cmd, globals, locals):
 """Similar to profile.Profile.runctx ."""

        with self():
            exec(cmd, globals, locals)
        return self