parameters: (self, group, name=None)
return_statement: return count
docstring: 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.
docstring_summary: Load modules from querying the specified setuptools ``group``.
docstring_tokens: Load modules from querying the specified setuptools group .
function: 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.
          """
          count = 0
          for dist in list(importlib_metadata.distributions()):
              for ep in dist.entry_points:
                  if (
                      ep.group != group
                      or (name is not None and ep.name != name)
                      # already registered
                      or self.get_plugin(ep.name)
                      or self.is_blocked(ep.name)
                  ):
                      continue
                  plugin = ep.load()
                  self.register(plugin, name=ep.name)
                  self._plugin_distinfo.append((plugin, DistFacade(dist)))
                  count += 1
          return count
function_tokens: def load_setuptools_entrypoints ( self , group , name = None ) : count = 0 for dist in list ( importlib_metadata . distributions ( ) ) : for ep in dist . entry_points : if ( ep . group != group or ( name is not None and ep . name != name ) # already registered or self . get_plugin ( ep . name ) or self . is_blocked ( ep . name ) ) : continue plugin = ep . load ( ) self . register ( plugin , name = ep . name ) self . _plugin_distinfo . append ( ( plugin , DistFacade ( dist ) ) ) count += 1 return count