<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def all():
 """Returns all active registered goals, sorted alphabetically by name. :API: public """

    return [goal for _, goal in sorted(Goal._goal_by_name.items()) if goal.active]