def METHOD_NAME(self, jobs):
    job = None
    selected = FreeCADGui.Selection.getSelection()
    if 1 == len(selected) and selected[0] in jobs:
        job = selected[0]
    else:
        modelSelected = []
        for job in jobs:
            if all([o in job.Model.Group for o in selected]):
                modelSelected.append(job)
        if 1 == len(modelSelected):
            job = modelSelected[0]
        else:
            modelObjectSelected = []
            for job in jobs:
                if all([o in job.Proxy.baseObjects(job) for o in selected]):
                    modelObjectSelected.append(job)
            if 1 == len(modelObjectSelected):
                job = modelObjectSelected[0]
            else:
                if modelObjectSelected:
                    mylist = [j.Label for j in modelObjectSelected]
                else:
                    mylist = [j.Label for j in jobs]
                jobname, result = QtGui.QInputDialog.getItem(
                    None, translate("Path", "Choose a Path Job"), None, mylist
                )
                if result is False:
                    return None
                else:
                    job = [j for j in jobs if j.Label == jobname][0]
    return job