def load_ui(path, parent=None, directory=None):
    """
    Load a .ui file

    Parameters
    ----------
    path : str
        Name of ui file to load

    parent : QObject
        Object to use as the parent of this widget

    Returns
    -------
    w : QtGui.QWidget
        The new widget
    """

    if directory is not None:
        full_path = os.path.join(directory, path)
    else:
        full_path = os.path.abspath(path)

    if not os.path.exists(full_path) and full_path in 'site-packages.zip':
        # Workaround for Mac app
        full_path = os.path.join(full_path.replace('site-packages.zip', 'glue'))

    from glue.external.qt import load_ui
    return load_ui(full_path, parent, custom_widgets=CUSTOM_QWIDGETS)
dataset/ETHPy150Open glue-viz/glue/glue/utils/qt/helpers.py/load_ui/swapped operands of `in`