<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def apply(self, q, bindings, drilldowns):
 """ Apply a set of grouping criteria and project them. """

        info = []
        for drilldown in self.parse(drilldowns):
            for attribute in self.cube.model.match(drilldown):
                info.append(attribute.ref)
                table, column = attribute.bind(self.cube)
                bindings.append(Binding(table, attribute.ref))
                q = q.column(column)
                q = q.group_by(column)
        return info, q, bindings