def check_sa_ea_for_each_branch(conn_components, start_activities, end_activities):
    """
    Checks if each branch of the parallel cut has a start
    and an end node of the subgraph

    Parameters
    --------------
    conn_components
        Parallel cut

    Returns
    -------------
    boolean
        True if each branch of the parallel cut has a start and an end node
    """
    if conn_components is None:
        return False

    for comp in conn_components:
        comp_sa_ok = False
        comp_ea_ok = False

        for sa in start_activities:
            if sa in comp:
                comp_sa_ok = True
                break
        for ea in end_activities:
            if ea in comp:
                comp_ea_ok = True
                break

        if not (comp_sa_ok and comp_ea_ok):
            return False

    return True