Update encapsulate_collection.py