fixed dtype.Collection pipeline with-statement logic