def get_trid_isrc_full_con(tr_id, tr_exc, exid2next_dic, nexts_cisrc_dic):
    """

    Get intron-spanning read count for transcript with ID tr_id. Also return
    if transcript exons are fully connected by intron-spanning reads
    (True, False).

    tr_id:
        Transcript ID
    tr_exc:
        Transcript exon count.
    exid2next_dic:
        exon ID to NEXT ID mapping
    nexts_cisrc_dic:
        Connected NEXT IDs with format "NEXT1,NEXT2" and mapping:
        "NEXT1,NEXT2" -> connecting IS read count

    >>> exid2next_dic = {"t1_e1" : "NEXT1", "t1_e2" : "NEXT2", "t1_e3": "NEXT3", "t2_e1": "NEXT4"}
    >>> nexts_cisrc_dic = {"NEXT1,NEXT2": 4, "NEXT2,NEXT3": 2}
    >>> get_trid_isrc_full_con("t1", 3, exid2next_dic, nexts_cisrc_dic)
    (6, True)
    >>> nexts_cisrc_dic = {"NEXT2,NEXT3": 5}
    >>> get_trid_isrc_full_con("t1", 3, exid2next_dic, nexts_cisrc_dic)
    (5, False)
    >>> get_trid_isrc_full_con("t2", 1, exid2next_dic, nexts_cisrc_dic)
    (0, False)

    """

    if tr_exc == 1:
        return 0, False

    isr_c = 0
    fully_con = True

    # print("tr_id:", tr_id)

    for i in range(tr_exc-1):
        ex_nr1 = i + 1
        ex_nr2 = i + 2
        ex_id1 = tr_id + "_e%i" %(ex_nr1)
        ex_id2 = tr_id + "_e%i" %(ex_nr2)
        # print(ex_id1, ex_id2)
        next1 = exid2next_dic[ex_id1]
        next2 = exid2next_dic[ex_id2]
        nexts1 = next1 + "," + next2
        nexts2 = next2 + "," + next1
        nexts1_yes = False
        nexts2_yes = False
        isr_c_pair = 0
        if nexts1 in nexts_cisrc_dic:
            nexts1_yes = True
        if nexts2 in nexts_cisrc_dic:
            nexts2_yes = True
        if nexts1_yes and nexts2_yes:
            assert False, "NEXT ID combination appears twice in nexts_cisrc_dic (%s, %s)" %(nexts1, nexts2)
        if nexts1_yes:
            isr_c_pair = nexts_cisrc_dic[nexts1]
        elif nexts2_yes:
            isr_c_pair = nexts_cisrc_dic[nexts2]
        isr_c += isr_c_pair
        if not nexts1_yes and not nexts2_yes:
            fully_con = False
        # print("isrc:", isr_c_pair)

    return isr_c, fully_con