YAML and Python custom