code: def determine_target_roots(self, goal_name):
      
      if not self.context.target_roots:
        print('WARNING: No targets were matched in goal `{}`.'.format(goal_name), file=sys.stderr)
  
      # For the v2 path, e.g. `./pants list` is a functional no-op. This matches the v2 mode behavior
      # of e.g. `./pants --changed-parent=HEAD list` (w/ no changes) returning an empty result.
      return self.context.target_roots
docs: Helper for tasks that scan for default target roots.
  
      :param string goal_name: The goal name to use for any warning emissions.