I am trying to group documents by ruleId with Mongo aggregation pipeline, I need to create nested level of grouping on the basis of runtime grouping parameters from python lambd