def _get_derivation_order(fnc):
    """
    Returns derivation order of function according to place in integrator chain.
    """
    from .splines import Spline
    if fnc.__func__ == Spline.f:
        return 0
    elif fnc.__func__ == Spline.df:
        return 1
    elif fnc.__func__ == Spline.ddf:
        return 2
    elif fnc.__func__ == Spline.dddf:
        return 3
    else:
        raise ValueError()
