def METHOD_NAME(tr):
    flag = tr['flags']
    fmode = tr['fmode']
    f = 'D' if flag & 1 else ' '
    if flag & 2:
        f += 'F' if fmode == 1 else 'N'
    f += 't' if flag >= 1024 else ' '
    return f