The with statement helps to ensure that the file is closed. 8. Compound statements — Python 3.14.0 documentation
This could be useful feature.
with metop_reader.open_dataset(file_path=str(test_file_path)) as ds:
## read some data
# metop_reader.close_dataset is automatically called.