<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_int_enums_to_docstring(enum):
 """Decorator for IntEnum which re-writes the documentation string so that Sphinx enumerates all the enumeration values. This is a work-around for Sphinx autodoc's inability to properly document IntEnums. This decorator adds enumeration names and values to the 'Attributes' section of the docstring of the decorated IntEnum class. Example:: An example IntEnum. <BLANKLINE> Attributes a = 0 b = 1 <BLANKLINE> """

    # The enum34 library (used for compatibility with Python < v3.4) rather
    # oddly set its docstring to None rather than some senible but empty
    # default...
    if enum.__doc__ is None:  # pragma: nocover
        enum.__doc__ = ""

    enum.__doc__ += ("\n\n"
                     "Attributes\n"
                     "----------\n")
    for val in list(enum):
        enum.__doc__ += "{} = {}\n".format(val.name, int(val))

    return enum