code: def cummedian(expr, sort=None, ascending=True, unique=False,
                preceding=None, following=None):
      data_type = _stats_type(expr)
      return _cumulative_op(expr, CumMedian, sort=sort, ascending=ascending,
                            unique=unique, preceding=preceding,
                            following=following, data_type=data_type)