def extract_before(extract_item):
    before_dict = {}
    for (key, item) in extract_item.items():
        if isinstance(item, dict):
            value = item.get('@before')
            if (value is not None):
                before_dict[key] = value
            else:
                before_dict[key] = extract_before(item)
        else:
            before_dict[key] = item
    return before_dict
def extract_before(extract_item):
    before_dict = {}
    for (key, item) in extract_item.items():
        if isinstance(item, dict):
            value = item.get('@before')
            if (value is not None):
                before_dict[key] = value
            else:
                before_dict[key] = extract_before(item)
        else:
            before_dict[key] = item
    return before_dict