def METHOD_NAME(stmt, setup=None, rpt=5, num=50000, verbose=False):
    """
    similar to ipython's timeit magic for an arbitrary line of code in a script
    """
    tot = min(timeit.Timer(stmt, globals=globals()).repeat(rpt, num))
    rate = tot/num/1e-9
    print("{:.0f} ns per call  (manual timer)".format(rate))
    return rate