r"""
    Args:
        items (list):

    Returns:
        dict: duplicate_map of indexes

    CommandLine:
        python -m utool.util_list --test-find_duplicate_items

    Example:
        >>> # DISABLE_DOCTEST
        >>> from utool.util_list import *  # NOQA
        >>> items = [0, 1, 2, 3, 3, 0, 12, 2, 9]
        >>> duplicate_map = find_duplicate_items(items)
        >>> result = str(duplicate_map)
        >>> print(result)

def find_duplicate_items(items, k=2):
    r"""
    Args:
        items (list):

    Returns:
        dict: duplicate_map of indexes

    CommandLine:
        python -m utool.util_list --test-find_duplicate_items

    Example:
        >>> # DISABLE_DOCTEST
        >>> from utool.util_list import *  # NOQA
        >>> items = [0, 1, 2, 3, 3, 0, 12, 2, 9]
        >>> duplicate_map = find_duplicate_items(items)
        >>> result = str(duplicate_map)
        >>> print(result)
    """
    import utool as ut
    # Build item histogram
    duplicate_map = ut.ddict(list)
    for count, item in enumerate(items):
        duplicate_map[item].append(count)
    # remove singleton items
    singleton_keys = []
    for key in six.iterkeys(duplicate_map):
        if len(duplicate_map[key]) == 1:
            singleton_keys.append(key)
    for key in singleton_keys:
        del duplicate_map[key]
    duplicate_map = dict(duplicate_map)
    return duplicate_map