<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sort_by_priority(iterable, reverse=False, default_priority=10):
 """ Return a list or objects sorted by a priority value. """

    return sorted(iterable, reverse=reverse, key=lambda o: getattr(o, 'priority', default_priority))