def METHOD_NAME(trace_file):
    try:
        with open(trace_file, 'rb') as tf:
            unpickler = pickle.Unpickler(tf)
            keyvals = unpickler.load()
            elf = unpickler.load()
            ptr_size = unpickler.load()
            tp_defs = unpickler.load()
            trace_buff = unpickler.load()
    except EOFError:
        print("Unexpected end of trace file", file=sys.stderr)
        quit(-1)
    except Exception as inst:
        print("Problem occurred during reading the tracefile: %s" % str(inst))
        quit(-1)
    return parse.sample_parser(keyvals, tp_defs, trace_buff, ptr_size)