def METHOD_NAME(self, x, strip=True, **kwds):
    """
        x -- code
        strip --ignored
    """
    if self.is_locked():
        return "<<currently executing code>>"
    if self._locked:
        self._locked = False
        #self._expect.expect('__unlocked__')
        self.expect().send('\n')
        self.expect().expect(self._prompt)
        self.expect().expect(self._prompt)
    try:
        return Sage.METHOD_NAME(self, x, **kwds)
    except ExceptionPexpect:
        return "<<currently executing code>>"