Reading dataset and converting to PyDataSet

I'm having an issue converting a dataset tag. It looks like the readBlocking function is returning a list. Here's my code from the script console:

datasetIn = system.tag.readBlocking('tagPath')

datasetInPy = system.dataset.toPyDataSet(datasetIn)

The error I get is "TypeError: toPyDataSet(): 1st arg can't be coerced to com.inductiveautomation.ignition.common.Dataset"

Any thoughts on how I can convert a dataset tag to a PyDataSet?

When you use readBlocking, you get a list of results, and those results are each a QualifiedValue, not your dataset type. Tack on [0].value to your first line.