Python repomd: Support for iteration and indexing by type - e.g. record = repomd['primary']