To avoid the try/except here:

```python
current_md_at_level = current_md[observation_metadata_level] if len(current_md) >= observation_metadata_level else ""
```

...but it might be good to reduce the length of the variable names.