Fortunately the syntax of most YAML nodes makes this fairly straightfoward.  For example if reading a header like:

```
---
data: 
   < ... complex nested data structure ... >
wcs:
    < ... even more complex nested data structure ...>
...
```

When the parser first reads `data:` it knows this is the beginning of a key-value mapping and so it's in a mapping node.  Then the value is *either* the rest of the line containing the `data:` indicator, or any other nodes on *indented* following lines.  That means the parser could, in principle, just skip reading the rest of the lines, and skip any indented lines following it, arriving at `wcs:` which is the next key-value indicator.  It could avoid parsing whatever data structure was the value associated with the `data:` key.