(obj)
| 519 | |
| 520 | # Count keys recursively |
| 521 | def count_keys(obj): |
| 522 | count = 0 |
| 523 | if isinstance(obj, dict): |
| 524 | for key, value in obj.items(): |
| 525 | if isinstance(value, dict): |
| 526 | count += count_keys(value) |
| 527 | else: |
| 528 | count += 1 |
| 529 | return count |
| 530 | |
| 531 | result["key_count"] = count_keys(data) |
| 532 |
no outgoing calls
no test coverage detected