<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on(self, name, _callback=None):
 """ Add a callback to the event named 'name'. Returns callback object for decorationable calls. """


        # this is being used as a decorator
        if _callback is None:
            return lambda cb: self.on(name, cb)

        if not (callable(_callback) or isawaitable(_callback)):
            msg = "Callback not callable: {0!r}".format(_callback)
            raise ValueError(msg)

        self._event_list[name].append(_callback)
        return _callback