Adapt Python code to split schemas.