<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def as_sorted_list(options):
 """ Returns all options in a list sorted according to their option numbers. :return: the sorted list """

        if len(options) > 0:
            options = sorted(options, key=lambda o: o.number)
        return options