(dep_group, child_pjob_id, child_app_name)
return True
Check if the dependency group for this app could possibly have
    generated this job_id.  If it could have, then this dependency group
    contains parents and is compatible
Check if the dependency group for this app could possibly have
    generated this job_id.  If it could have, then this dependency group
    contains parents and is compatible
Check if the dependency group for this app could possibly have generated this job_id . If it could have then this dependency group contains parents and is compatible
def dep_group_and_job_id_compatible(dep_group, child_pjob_id, child_app_name):
    """Check if the dependency group for this app could possibly have
    generated this job_id.  If it could have, then this dependency group
    contains parents and is compatible
    """
    if child_pjob_id is None:
        return True  # all dependency groups are compatible

    cj = get_autofill_values(child_app_name, raise_err=False)
    for parent in dep_group['app_name']:
        pj = get_autofill_values(parent, raise_err=False)
        _, parent_template = get_job_id_template(parent)

        # did this job_id come from this parent?
        for k in parent_template:
            if k not in child_pjob_id and k not in dep_group and k not in pj:
                if 'job_id' not in dep_group:
                    return False
        for k, v in child_pjob_id.items():
            if k in dep_group and v not in dep_group[k]:
                return False
            if k in cj and v not in cj[k] and v not in dep_group.get(k, []):
                return False
    return True
def dep_group_and_job_id_compatible ( dep_group , child_pjob_id , child_app_name ) : if child_pjob_id is None : return True # all dependency groups are compatible cj = get_autofill_values ( child_app_name , raise_err = False ) for parent in dep_group [ 'app_name' ] : pj = get_autofill_values ( parent , raise_err = False ) _ , parent_template = get_job_id_template ( parent ) # did this job_id come from this parent? for k in parent_template : if k not in child_pjob_id and k not in dep_group and k not in pj : if 'job_id' not in dep_group : return False for k , v in child_pjob_id . items ( ) : if k in dep_group and v not in dep_group [ k ] : return False if k in cj and v not in cj [ k ] and v not in dep_group . get ( k , [ ] ) : return False return True