code: def median_mean(timeseries, segmentlength, noverlap=None,
                  window=None, plan=None):
      
      return _lal_spectrum(timeseries, segmentlength, noverlap=noverlap,
                           method='median-mean', window=window, plan=plan)
docs: Calculate a PSD of this `TimeSeries` using a median-mean average method
  
      The median-mean average method divides overlapping segments into "even"
      and "odd" segments, and computes the bin-by-bin median of the "even"
      segments and the "odd" segments, and then takes the bin-by-bin average
      of these two median averages.
  
      Parameters
      ----------
      timeseries : `~gwpy.timeseries.TimeSeries`
          input `TimeSeries` data.
  
      segmentlength : `int`
          number of samples in single average.
  
      noverlap : `int`
          number of samples to overlap between segments, defaults to 50%.
  
      window : `tuple`, `str`, optional
          window parameters to apply to timeseries prior to FFT
  
      plan : `REAL8FFTPlan`, optional
          LAL FFT plan to use when generating average spectrum
  
      Returns
      -------
      spectrum : `~gwpy.frequencyseries.FrequencySeries`
          average power `FrequencySeries`
  
      See also
      --------
      lal.REAL8AverageSpectrumMedianMean