def METHOD_NAME(b, dataset, val_t):
    d = {}
    for v in dataset:
        v = val_t(v)
        if v not in d:
            d[v] = 0
        d[v] += 1
    b.mode, b.mode_n = max(d.items(), key=lambda a: a[1])