Port _Container.py.