implement test for test_trace_decode and fix style