| def product_data_to_str(product_data: dict[str, any]) -> str: | |
| """ | |
| Convert product data to a string. | |
| Args: | |
| - product_data: a dictionary of product data | |
| Returns: | |
| - a string representation of the product data | |
| """ | |
| if product_data is None: | |
| return "" | |
| return "\n".join([f"{k}: {v}" for k, v in product_data.items()]) | |