Documented function on job_grouping.py for future reference.
Also added comments that track the whole execution process.