def METHOD_NAME():
    class Term:
        encoding = 'utf-7'
    s = util.guess_decode_from_terminal('\xff'.encode('utf-7'), Term)
    assert s == ('\xff', 'utf-7')
    s = util.guess_decode_from_terminal('\xff'.encode(), Term)
    assert s == ('\xff', 'utf-8')