(data)
| 452 | return structure |
| 453 | |
| 454 | def clean_structure_post(data): |
| 455 | if isinstance(data, dict): |
| 456 | data.pop('page_number', None) |
| 457 | data.pop('start_index', None) |
| 458 | data.pop('end_index', None) |
| 459 | if 'nodes' in data: |
| 460 | clean_structure_post(data['nodes']) |
| 461 | elif isinstance(data, list): |
| 462 | for section in data: |
| 463 | clean_structure_post(section) |
| 464 | return data |
| 465 | |
| 466 | def remove_fields(data, fields=['text']): |
| 467 | if isinstance(data, dict): |
nothing calls this directly
no outgoing calls
no test coverage detected