<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def emit(self, action, payload, level=Level.INSTANT):
 """Emit action."""

        if level == self.Level.INSTANT:
            return self.emit_instantly(action, payload)
        elif level == self.Level.CONTEXTUAL:
            return self.emit_contextually(action, payload)
        elif level == self.Level.DELAY:
            return self.emit_delayed(action, payload)
        else:
            raise Exception('InvalidEmitLevel: %s' % level)