<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_dict_by_key(obj):
 """ Sort dict by its keys OrderedDict([('a', 3), ('b', 2), ('c', 1), ('d', 4)]) """

    sort_func = lambda x: x[0]
    return OrderedDict(sorted(obj.items(), key=sort_func))