def has_long_homopolymer(bases: str, max_hp_length: int) ->bool:
    """Returns true if the given bases has a homopolymer length longer than the given length.

    Args:
        bases: the bases to examine.
        max_hp_length: the maximum homopolymer length to allow.
    """
    count = 1
    last_base = bases[0]
    for i in range(1, len(bases)):
        cur_base = bases[i]
        if last_base == cur_base:
            count += 1
            if count > max_hp_length:
                return True
        else:
            last_base = cur_base
            count = 1
    return count > max_hp_length
