def remove_repeating_chars(t):
    "If the same character is present 4+ times (not 3 because of roman 'VIII'), replace with single instance"
    return re.sub(r"(\D)(\1{3,})", r"\1", t)
If the same character is present 4+ times (not 3 because of roman 'VIII'), replace with single instance
src/dalle_mini/model/text.py