Python code to create CBO reports