Recursively merge two dictionaries. Args: dict1 (dict): First dictionary. dict2 (dict): Second dictionary. Returns: dict: Merged dictionary.
(dict1: dict, dict2: dict)
| 223 | |
| 224 | |
| 225 | def merge_dicts(dict1: dict, dict2: dict) -> dict: |
| 226 | """ |
| 227 | Recursively merge two dictionaries. |
| 228 | |
| 229 | Args: |
| 230 | dict1 (dict): First dictionary. |
| 231 | dict2 (dict): Second dictionary. |
| 232 | |
| 233 | Returns: |
| 234 | dict: Merged dictionary. |
| 235 | """ |
| 236 | merged = dict1.copy() |
| 237 | for key, value in dict2.items(): |
| 238 | if key in merged and isinstance(merged[key], dict) and isinstance(value, dict): |
| 239 | merged[key] = merge_dicts(merged[key], value) |
| 240 | else: |
| 241 | merged[key] = value |
| 242 | return merged |
| 243 | |
| 244 | |
| 245 | def process_theorem(models, file_path: str, eval_type: str, retry_limit: int, |