import os filepath = 'schemas/20251121/linkml/modules/classes/FinancialStatement.yaml' with open(filepath, 'r') as f: lines = f.readlines() new_lines = [] for i, line in enumerate(lines): # Locate the specific misplaced line # It was (8 spaces) under (6 spaces). # It should be (6 spaces) as a sibling slot_usage. # BUT wait, the previous inspection showed followed by . # That suggests it was an EXAMPLE inside slot_usage? No, slot_usage defines constraints. # examples are under key. # If was under in , it's invalid unless it's a property of that slot (it isn't). # If it was an example, it should be under . # Let's look at the file content again (after revert). pass # We need to read it first to know what to fix.