def _remove_provider_extensions(self, provider):

        # Each provider can contribute to multiple extension points, so we
        # build up a dictionary of the 'ExtensionPointChanged' events that we
        # need to fire.
        events = {}

        # Find the index of the provider in the provider list. Its
        # contributions are at the same index in the extensions list of lists.
        index = self._providers.index(provider)

        # Does the provider contribute any extensions to an extension point
        # that has already been accessed?
        for extension_point_id, extensions in self._extensions.items():
            old = extensions[index]

            # We only need fire an event for this extension point if the
            # provider contributed any extensions.
            if len(old) > 0:
                offset = sum(map(len, extensions[:index]))
                refs  = self._get_listener_refs(extension_point_id)
                events[extension_point_id] = (refs, old[:], offset)

            del extensions[index]

        return events
Remove a provider's extensions from the registry.
dataset/ETHPy150Open enthought/envisage/envisage/provider_extension_registry.py/ProviderExtensionRegistry._remove_provider_extensions