input: Write a python function to calculate the average number of elements per sublist.
  assert avg_elements([[1, 2, 3], [4, 5], [6, 7, 8, 9]]) == 3.0
  assert avg_elements([[1], [2], [3], [4], [5]]) == 1.0
  assert avg_elements([[1, 2, 3, 4, 5], [6, 7], [8, 9, 10]]) == 3.0
output: def avg_elements(nested_list):
      total_elements = sum(len(sublist) for sublist in nested_list)
      total_sublists = len(nested_list)
      return total_elements / total_sublists