Emit signal by calling all connected slots.

        The arguments supplied have to match the signal definition.

        Args:
            kwargs: Keyword arguments to be passed to connected slots.

        Raises:
            :exc:`InvalidEmit`: If arguments don't match signal specification.

def emit(self, **kwargs):
        """Emit signal by calling all connected slots.

        The arguments supplied have to match the signal definition.

        Args:
            kwargs: Keyword arguments to be passed to connected slots.

        Raises:
            :exc:`InvalidEmit`: If arguments don't match signal specification.
        """
        self._ensure_emit_kwargs(kwargs)
        for slot in self.slots:
            slot(**kwargs)