def get_stat(statistics_type):
    """
    Get statistics from devfile in list of lists of words
    """
    def filter_stat():
        for x in check_output(["vnstat", "--dumpdb"]).decode("utf-8").splitlines():
            if x.startswith("{};0;".format(statistics_type)):
                return x

    try:
        type, number, ts, rxm, txm, rxk, txk, fill = filter_stat().split(";")
    except OSError as e:
        print("Looks like you haven't installed or configured vnstat!")
        raise e
    except __HOLE__:
        raise RuntimeError("vnstat returned wrong output, maybe it's configured wrong or module is outdated")

    up = (int(txm) * 1024 + int(txk)) * 1024
    down = (int(rxm) * 1024 + int(rxk)) * 1024

    return {
        "up": up,
        "down": down,
        "total": up+down
    }
dataset/ETHPy150Open ultrabug/py3status/py3status/modules/vnstat.py/get_stat