Added a function to extract passes from objects.

For testing purposes.