<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_diclist(undecorated, sort_on):
 """ Sort a list of dictionaries by the value in each dictionary for the sorting key Parameters undecorated : list of dicts sort_on : str, numeric key that is present in all dicts to sort on Returns --------- ordered list of dicts Examples --------- [{'key2': 20, 'key1': 1}, {'key2': 2, 'key1': 10}] [{'key2': 2, 'key1': 10}, {'key2': 20, 'key1': 1}] """

    decorated = [(len(dict_[sort_on]) if hasattr(dict_[sort_on], '__len__') else dict_[
                  sort_on], index) for (index, dict_) in enumerate(undecorated)]
    decorated.sort()
    return[undecorated[index] for (key, index) in decorated]