<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _lookup_element(lst, key):
    '''
    Find an dictionary in a list of dictionaries, given its main key.
    '''
    if not lst:
        return {}
    for ele in lst:
        if not ele or not isinstance(ele, dict):
            continue
        if ele.keys()[0] == key:
            return ele.values()[0]
    return {}