When printing a collection, I get an error 'print(aligned_collection)'

Hello,

I was testing some code and encountered an error when attempting to print a collection object.

Here is the traceback:


.0 = <dict_valueiterator object at 0x2aabb6af3360>
inner_type = qiime2.core.type.grammar.UnionExp(v.type for v in self.collection.values()).normalize()
E AttributeError: 'BAMSortedAndIndexedDirFmt' object has no attribute 'type'
/home/bvan-tassel/miniconda3/envs/q2-asap-dev/lib/python3.9/site-packages/qiime2/sdk/result.py:593: AttributeError
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Captured stdout call _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

The error occurs in this function:

 def alignedCollectionCombiner(aligned_collection: BAMSortedAndIndexedDirFmt) -> BAMSortedAndIndexedDirFmt:
    print(aligned_collection)
 
    aligned_output_artifact = BAMSortedAndIndexedDirFmt()

When I comment out the print statement, my tests pass without any issues.

@bvan-tassel, are you looking for help with this? We're going to need some additional context if so, such as a link to a pull requests where the tests have failed so we can try to assess what's happening.