docs: def groupby_asof(df, as_of=None, dt_col='sample_dt', asof_col='observed_dt'):
      ''' Common use case for selecting the latest rows from a bitemporal dataframe as-of a certain date.
  
      Parameters
      ----------
      df: ``pd.DataFrame``
          Dataframe with a MultiIndex index
      as_of: ``datetime``
          Return a timeseries with values observed <= this as-of date. By default, the latest observed
          values will be returned.
      dt_col: ``str`` or ``int``
          Name or index of the column in the MultiIndex that is the sample date
      asof_col: ``str`` or ``int``
          Name or index of the column in the MultiIndex that is the observed date
      '''
      if as_of:
          if as_of.tzinfo is None and df.index.get_level_values(asof_col).tz is not None:
              as_of = as_of.replace(tzinfo=mktz())
      return fancy_group_by(df,
                            grouping_level=dt_col,
                            aggregate_level=asof_col,
                            method='last',
                            max_=as_of)