<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def merge_dicts(*dict_list):
 """Extract all of the dictionaries from this list, then merge them together """

    # if not isinstance(dict_list, list):
    #     raise TypeError("dict_list is not a list. Please try again")
    # print(dict_list)
    all_dicts = []
    for ag in dict_list:
        if isinstance(ag, dict):
            all_dicts.append(ag)
    
    # Get all dictionaries
    # Merge them
    # Check if type is there
    try:
        qitem = { k: v for d in all_dicts for k, v in d.items() }
        return qitem
    except Exception:
        return {}