@staticmethod
    def findClosestParentMashuptrail(vt_controller, version):
        res = None
        mashuptrails = {}
        if hasattr(vt_controller, "_mashups"):
            for mashuptrail in vt_controller._mashups:
                #print mashuptrail.vtVersion
                mashuptrails[mashuptrail.vtVersion] = mashuptrail
        action_map = vt_controller.vistrail.actionMap
        if version > 0 and len(mashuptrails) > 0:
            v = action_map[version].parent
            while True:
                if v in mashuptrails and v <= 0:
                    if v in mashuptrails:
                        res = mashuptrails[v]
                    else:
                        res = None
                    return (res, v)
                v = action_map[v].parent
        return (res, -1)
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/mashups/mashups_manager.py/MashupsManager.findClosestParentMashuptrail/operator `or` -> `and`