Write a Python function to insert an element in a given list after a given index.
list = [1, 2, 3, 4, 5]
index = 2
element = 6
def insert_element(list, index, element):
    list.insert(index + 1, element)
    return list