<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def undelay(self):
        '''resolves all delayed arguments'''
        i = 0
        while i < len(self):
            op = self[i]
            i += 1
            if hasattr(op, 'arg1'):
                if isinstance(op.arg1,DelayedArg):
                    op.arg1 = op.arg1.resolve()
                if isinstance(op.arg1,CodeBlock):
                    op.arg1.undelay()