def METHOD_NAME(result):
    """
    Chew the results a bit and show a nice summary
    Args: raw trex results
    Returns: A list of samples with the following format:
    [
    {
    "time_delta": 0.1
    "packets"
    [
    "port0": {
        "tx_delta": 12345
        "rx_delta": 12334
        },
    "port0": {
        "tx_delta": 12345
        "rx_delta": 12334
        }
    }
    ]
    """
    prev_time = result["start_time"]
    prev_tx_val = {}
    prev_rx_val = {}
    digested_results=[]
    for res in result["data"]:
        sample={}
        time_delta = res["timestamp"] - prev_time
        sample["time_delta"]=time_delta
        packets={}
        for port in res["measurement"]:
            if port == "global" or port == "total" or port == "flow_stats" or port == "latency":
                continue
            tx_delta = res["measurement"][port]["opackets"] - (prev_tx_val.get(port) or 0)
            rx_delta = res["measurement"][port]["ipackets"] - (prev_rx_val.get(port) or 0)
            packets[port] = {
                    "tx_delta": tx_delta,
                    "rx_delta": rx_delta
                    }
            prev_tx_val[port] = res["measurement"][port]["opackets"]
            prev_rx_val[port] = res["measurement"][port]["ipackets"]
        sample["packets"]=packets
        digested_results.append(sample)
        prev_time = res["timestamp"]
    return digested_results