human
What is a good Python function to return a list index for duplicated data.
assistant
Here is a Python function to return a list index for duplicated data

import collections

def get_index(list_of_list, value):
    """
    Get the index of a value in a list of list.

    :param list list_of_list:
    :param value:
    :rtype: int
    :return:
    """
    for i in range(len(list_of_list)):
        if list_of_list[i] == value:
            return i
    return -1

# Enter the list
list1 = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]

# Calling the function
print((get_index(list1, 5)))

#Example Output
# -1

#Remember to inspect code for bugs.