from typing import OrderedDict


def extractKeyIndexTimeValue(dic={0 : 0}, frameRange=(0, 30), **kwargs):
    """this is extract animCurve's time and value in any frame range.

    Parameters
    ----------
    dic        : dict(in int or float)
                    key = time, value = value.

    frameRange : tupple(in int or float)
                    input spicifid range of frameRange.

    Returns
    -------
    dict
        ectracted keyframe has index, time and value dictonary.
    
    """
    
    range_idtv = OrderedDict()
    st, end    = frameRange
    
    idx = 0
    for t, v in dic.items():
        if st <= t and t <= end :
            range_idtv[idx] = { t : v }
        idx += 1
 
    return range_idtv