Convert regexp flags to string.

    Parameters
    ----------
    flags : `int`
        Flags.
    custom_flags : `int`
        Custom flags.

    Returns
    -------
    `str`
        Flag string.

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