code: def get_resampler_for_grouping(groupby, rule, how=None, fill_method=None,
                                 limit=None, kind=None, **kwargs):
      
  
      # .resample uses 'on' similar to how .groupby uses 'key'
      kwargs['key'] = kwargs.pop('on', None)
  
      tg = TimeGrouper(freq=rule, **kwargs)
      resampler = tg._get_resampler(groupby.obj, kind=kind)
      r = resampler._get_resampler_for_grouping(groupby=groupby)
      return _maybe_process_deprecations(r,
                                         how=how,
                                         fill_method=fill_method,
                                         limit=limit)
docs: Return our appropriate resampler when grouping as well.