input: Write a function that takes in a list and prints a dictionary with the elements and the product of each element. The function should return the dictionary and the assert statements should check if the function returns the expected dictionary for given inputs.
  
  def product_of_list(list):
      output = {}
      for element in list:
          output[element] = element * element
      return output
  
  assert product_of_list([7, 8, 5]) == {7: 49, 8: 64, 5: 25}
  assert product_of_list([3, 4, 2]) == {3: 9, 4: 16, 2: 4}
  assert product_of_list([10, 20, 30]) == {10: 100, 20: 400, 30: 900}
  assert product_of_list([1, 2, 3, 4]) == {1: 1, 2: 4, 3: 9, 4: 16}
  assert product_of_list([]) == {}
output: def product_of_list(list):
      output = {}
      for element in list:
          output[element] = element * element
      return output