Port _PlacementBase.py.