<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def resolve(self, working_set=None):
 """Resolves any configured plugins and adds them to the global working set. :param working_set: The working set to add the resolved plugins to instead of the global working set (for testing). :type: :class:`pkg_resources.WorkingSet` """

    working_set = working_set or global_working_set
    if self._plugin_requirements:
      for plugin_location in self._resolve_plugin_locations():
        if self._is_wheel(plugin_location):
          plugin_location = self._activate_wheel(plugin_location)
        working_set.add_entry(plugin_location)
    return working_set