def v_lookup(version, d):
    """
    Find the value depending of current eplus version.

    Parameters
    ----------
    version: tuple of int
    d: dict
        {(0, 0): value, (x, x): value, ...}
        for version v, current value is the value of version lv such as lv <= v < lv+1
    """
    v = version[:2]
    for lv, value in sorted(d.items(), reverse=True):
        if v >= lv:
            return value
