def get_named_parent_widget(source_widget, parent_widget_object_name):
    """
    Returns the parent widget with a given name of source_widget

    :param source_widget: <QWidget>
    :param parent_widget_object_name: <string> objectName of the parent widget you're looking for
    :return:
    """
    parent_widget = source_widget.parentWidget()
    if parent_widget is not None and parent_widget.objectName() != parent_widget_object_name:
        return get_named_parent_widget(parent_widget, parent_widget_object_name)
    return parent_widget