import pickle


def viw_pkl(path, start=0, end=10):
    """view dict in pickle file from start to end

    Args:
        path(str): absolute path
        start(int, optional): start index of dict. Defaults to 0.
        end(int, optional): end index of dict. Defaults to 10.

    Returns:
        result(dict): a small dict

    Examples:
        >>> d = Dict()
        >>> d.viw_pkl("/home/directory/test.pkl", 0, 10)
        {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5,
            'f': 6, 'g': 7, 'h': 8, 'i': 9, 'j': 10}
    """
    n_pkl = []
    with open(path, "rb") as f:
        dict_object = pickle.load(f)
        result = dict(list(dict_object.items())[start: end])
    return result