def METHOD_NAME(valRange):
    """
    Find step for the passed range, which is based on 1, 2 or 5.
    Step returned will make sure that range fits 10..50 of them,
    as close to 10 as possible.
    """
    steps = {1: None, 2: None, 5: None}
    for baseInc in steps:
        baseIncAmount = valRange / baseInc
        incScale = math.floor(math.log10(baseIncAmount) - 1)
        steps[baseInc] = baseInc * 10 ** incScale
    chosenBase = min(steps, key=lambda base: valRange / steps[base])
    chosenStep = steps[chosenBase]
    if inverse:
        chosenStep *= -1
    return chosenStep