code: def median(self, default=None):
          
          return numpy.asscalar(numpy.median(self.values)) if self.values else default
docs: Calculate the median value over the time series.
  
          :param default: Value to return as a default should the calculation not be possible.
          :return: Float representing the median value or `None`.