Write a Python UDF that takes a dictionary and transforms it into a useful metric.
Asked in the technical screen stage. Use simple Python without LeetCode-specific tricks. For this exercise, define the metric as the arithmetic mean of all non-None numeric values in the dictionary.
Implement average_dict_values(data). The input is a dictionary whose values are integers, floats, or None. Return a float. Return 0.0 when the dictionary contains no numeric values.
def average_dict_values(data):