<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_common_members():
 """Sorts the keys and members"""


    filename = PREFIX + '/common_members.json'
    sorted_json_data = {}
    json_data = read_json(filename)

    all_keys = []
    for key, value in json_data.items():
        all_keys.append(key)
    sorted_keys = sorted(all_keys)

    for key in sorted_keys:
        if len(json_data[key]) > 0:
            # Only add modules which have common members
            sorted_json_data[key] = sorted(json_data[key])

    print('--> Sorted/cleaned ' + os.path.basename(filename))

    write_json(sorted_json_data, filename)