def METHOD_NAME(value, max_value):
    """Make number compact if too long."""
    number = localize_number(value)
    if int(value) > max_value:
        number = compact_number(value, max_value=1_000_000)
    return number