<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def re_flags_str(flags, custom_flags):
 """Convert regexp flags to string. Parameters flags : `int` Flags. custom_flags : `int` Custom flags. Returns ------- `str` Flag string. """

    res = ''
    for flag in RE_FLAGS:
        if flags & getattr(re, flag):
            res += flag
    for flag in RE_CUSTOM_FLAGS:
        if custom_flags & getattr(ReFlags, flag):
            res += flag
    return res