input: Write a python function to calculate the average of values for a given key in a dictionary.
  assert calculate_avg_from_dict({'student1': [1, 2, 3], 'student2': [4, 5, 6], 'student3': [7, 8, 9]}, 'student3') == 8.0
  assert calculate_avg_from_dict({'student1': [10, 20, 30], 'student2': [40, 50, 60]}, 'student1') == 20.0
  assert calculate_avg_from_dict({'A': [1, 1, 1], 'B': [2, 2, 2], 'C': [3, 3, 3]}, 'B') == 2.0
output: def calculate_avg_from_dict(data, key):
      if key in data and data[key]:
          return sum(data[key]) / len(data[key])
      return 0.0