<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_setuptools_entrypoints(self, group, name=None):
 """ Load modules from querying the specified setuptools ``group``. :param str group: entry point group to load plugins :param str name: if given, loads only plugins with the given ``name``. :rtype: int :return: return the number of loaded plugins by this call. """

        from pkg_resources import (
            iter_entry_points,
            DistributionNotFound,
            VersionConflict,
        )

        count = 0
        for ep in iter_entry_points(group, name=name):
            # is the plugin registered or blocked?
            if self.get_plugin(ep.name) or self.is_blocked(ep.name):
                continue
            try:
                plugin = ep.load()
            except DistributionNotFound:
                continue
            except VersionConflict as e:
                raise PluginValidationError(
                    plugin=None,
                    message="Plugin %r could not be loaded: %s!" % (ep.name, e),
                )
            self.register(plugin, name=ep.name)
            self._plugin_distinfo.append((plugin, ep.dist))
            count += 1
        return count