Laravel Collection Group By Python