def METHOD_NAME(dv):
    log10_dv = np.log10(dv)
    base = np.floor(log10_dv)
    frac = log10_dv - base
    steps = np.log10([1, 2, 5, 10])
    imin = np.argmin(np.abs(frac - steps))
    return 10.0 ** (base + steps[imin])