code: def _get_on_name(self, func):
          
          r = re.match("^on_(.+)$", func.__name__)
          if r:
              event = r.group(1)
          else:
              raise ValueError("The function name should be "
                               "`on_<eventname>`().")
          return event
docs: Return `eventname` when the function name is `on_<eventname>()`.