def subscribe(self, callback, existing=True):
        """Invoke `callback` for all distributions

        If `existing=True` (default),
        call on all existing ones, as well.
        """
        if callback in self.callbacks:
            return
        self.callbacks.append(callback)
        if not existing:
            return
        for dist in self:
            callback(dist)
Invoke `callback` for all distributions

        If `existing=True` (default),
        call on all existing ones, as well.
        
src/pkg_resources/__init__.py