code: def from_spectra(cls, *spectra, **kwargs):
          
          data = numpy.vstack([s.value for s in spectra])
          spec1 = list(spectra)[0]
          if not all(s.f0 == spec1.f0 for s in spectra):
              raise ValueError("Cannot stack spectra with different f0")
          if not all(s.df == spec1.df for s in spectra):
              raise ValueError("Cannot stack spectra with different df")
          kwargs.setdefault('name', spec1.name)
          kwargs.setdefault('channel', spec1.channel)
          kwargs.setdefault('epoch', spec1.epoch)
          kwargs.setdefault('f0', spec1.f0)
          kwargs.setdefault('df', spec1.df)
          kwargs.setdefault('unit', spec1.unit)
          if not ('dt' in kwargs or 'times' in kwargs):
              try:
                  kwargs.setdefault('dt', spectra[1].epoch.gps - spec1.epoch.gps)
              except (AttributeError, IndexError):
                  raise ValueError("Cannot determine dt (time-spacing) for "
                                   "Spectrogram from inputs")
          return Spectrogram(data, **kwargs)
docs: Build a new `Spectrogram` from a list of spectra.
  
          Parameters
          ----------
          *spectra
              any number of `~gwpy.frequencyseries.FrequencySeries` series
          dt : `float`, `~astropy.units.Quantity`, optional
              stride between given spectra
  
          Returns
          -------
          Spectrogram
              a new `Spectrogram` from a vertical stacking of the spectra
              The new object takes the metadata from the first given
              `~gwpy.frequencyseries.FrequencySeries` if not given explicitly
  
          Notes
          -----
          Each `~gwpy.frequencyseries.FrequencySeries` passed to this
          constructor must be the same length.