Tell me about constructing a dictionary that maps product data by country of origin, product ID, and related fields, including when you would use defaultdict.
Implement build_product_index(products) to return a nested dictionary mapping each country of origin to each product ID, with a list of matching product records. Explain why defaultdict is useful and return ordinary dictionaries in the final result.
def build_product_index(products):