<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def determine_target_roots(self, goal_name):
 """Helper for tasks that scan for default target roots. :param string goal_name: The goal name to use for any warning emissions. """

    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