Write a function to insert an element before each element of a list.
def insert_element(list,element):
 list = [v for elt in list for v in (element, elt)]
 return list
<s>[INST]<<SYS>>Given a task and its code, generate test cases for the code.<</SYS>>Write a function to insert an element before each element of a list.
def insert_element(list,element):
 list = [v for elt in list for v in (element, elt)]
 return list[/INST]assert insert_element(['Red', 'Green', 'Black'] ,'c')==['c', 'Red', 'c', 'Green', 'c', 'Black'] 
assert insert_element(['python', 'java'] ,'program')==['program', 'python', 'program', 'java'] 
assert insert_element(['happy', 'sad'] ,'laugh')==['laugh', 'happy', 'laugh', 'sad'] </s>