code: def _callbacks_grouped_by_name(self):
          
          callbacks, names_set_by_user = OrderedDict(), set()
          for name, cb, named_by_user in self._yield_callbacks():
              if named_by_user:
                  names_set_by_user.add(name)
              callbacks[name] = callbacks.get(name, []) + [cb]
          return callbacks, names_set_by_user
docs: Group callbacks by name and collect names set by the user.