Python example to read and process YAML file