def find_named(ui, name):
    """
    Go through the hierarchy of UI elements and find the elements that have the same name
    """
    results = set()
    if hasattr(ui, 'name'):
        if ui.name == name:
            results.add(ui)

    if hasattr(ui, 'children'):
        for c in ui.children:
            resuls_children = find_named(c, name)
            results.update(resuls_children)

    if hasattr(ui, 'tabs'):
        for c in ui.tabs:
            resuls_children = find_named(c, name)
            results.update(resuls_children)

    if hasattr(ui, 'child'):
        resuls_children = find_named(ui.child, name)
        results.update(resuls_children)

    return results