import re


def get_major_lc_len_from_seqs_dic(seqs_dic):
    """
    Go through sequences dictionary (sequence iD -> sequence) and extract
    longest lowercase part for each sequence. Count how many times each
    length appears and return most frequent length.

    >>> seqs_dic = {'id1': 'acgACGUac', 'id2': 'ACGU', 'id3': 'GUacguaa', 'id4': 'cguACGU'}
    >>> get_major_lc_len_from_seqs_dic(seqs_dic)
    3
    >>> seqs_dic = {'id1': 'CCAA', 'id2': 'ACGU'}
    >>> get_major_lc_len_from_seqs_dic(seqs_dic)
    False

    """
    assert seqs_dic, "given seqs_dic empty"
    # Lowercase part length counts dictionary.
    lcl_dic = {}
    for seq_id in seqs_dic:
        m = re.search("([acgtun]+)", seqs_dic[seq_id])
        if m:
            lc_len = len(m.group(1))
            if lc_len not in lcl_dic:
                lcl_dic[lc_len] = 1
            else:
                lcl_dic[lc_len] += 1
    major_len = False
    if lcl_dic:
        for lcl, lcc in sorted(lcl_dic.items(), key=lambda item: item[1], reverse=True):
            major_len = lcl
            break
    return major_len