<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_decode_format(flags):
 """ Returns a tuple of format, recognized """

    c_flags = flags & FMT_COMMON_MASK
    l_flags = flags & FMT_LEGACY_MASK

    if c_flags:
        if c_flags not in COMMON_FORMATS:
            return FMT_BYTES, False
        else:
            return COMMON2UNIFIED[c_flags], True
    else:
        if not l_flags in LEGACY_FORMATS:
            return FMT_BYTES, False
        else:
            return LEGACY2UNIFIED[l_flags], True