Connects a function to a hook.\
        Creates the hook (name) if it does not exists

        :param str name: The hook name
        :param callable func: A function reference used as a callback
        :param class sender: Optional sender __class__ to which the\
        func should respond. Default will match all
        :param str dispatch_uid: Optional unique id,\
        see :py:class:`django.dispatch.Signal` for more info

def connect(self, name, func, sender=None, dispatch_uid=None):
        """
        Connects a function to a hook.\
        Creates the hook (name) if it does not exists

        :param str name: The hook name
        :param callable func: A function reference used as a callback
        :param class sender: Optional sender __class__ to which the\
        func should respond. Default will match all
        :param str dispatch_uid: Optional unique id,\
        see :py:class:`django.dispatch.Signal` for more info
        """
        try:
            signal = self._registry[name]
        except KeyError:
            signal = self.register(name)

        signal.connect(func, sender=sender, dispatch_uid=dispatch_uid)