From what I can tell, this function parses a BIOM file and returns the dense data matrix, observation IDs (e.g. OTU IDs), and sample IDs. This functionality is provided in the [biom-format](http://biom-format.org/) Python API (see the ```biom.table.Table``` class).

You can parse a BIOM file with ```biom.parse.parse_biom_table``` and then you'll have a subclass of ```biom.table.Table```. Then, for example, you can access the sample IDs via ```Table.SampleIds``` and the observation IDs via ```Table.ObservationIds```, and iterate through the table data however you'd like.

Please update your code to utilize the biom-format API, as this will reduce duplicate code/effort and avoid storing the entire sparse data matrix in dense format.