code: def iterate(self, scopes):
      
      scope_infos = [self._scope_to_info[s] for s in self._expand_tasks(scopes)]
      if scope_infos:
        for scope_info in self._expand_subsystems(scope_infos):
          yield scope_info
docs: Yields ScopeInfo instances for the specified scopes, plus relevant related scopes.
  
      Relevant scopes are:
        - All tasks in a requested goal.
        - All subsystems tied to a request scope.
  
      Yields in a sensible order: Sorted by scope, but with subsystems tied to a request scope
      following that scope, e.g.,
  
      goal1
      goal1.task11
      subsys.goal1.task11
      goal1.task12
      goal2.task21
      ...