code: def _multitaper_spectrum(self, clm, k, convention='power', unit='per_l',
                               lmax=None, taper_wt=None):
          
          if lmax is None:
              lmax = clm.lmax
  
          sh = clm.to_array(normalization='4pi', csphase=1, lmax=lmax)
  
          if taper_wt is None:
              mtse, sd = _shtools.SHMultiTaperMaskSE(sh, self.tapers, lmax=lmax,
                                                     k=k)
          else:
              mtse, sd = _shtools.SHMultiTaperMaskSE(sh, self.tapers, lmax=lmax,
                                                     k=k, taper_wt=taper_wt)
  
          if (unit == 'per_l'):
              pass
          elif (unit == 'per_lm'):
              degree_l = _np.arange(len(mtse))
              mtse /= (2.0 * degree_l + 1.0)
              sd /= (2.0 * degree_l + 1.0)
          else:
              raise ValueError(
                  "unit must be 'per_l' or 'per_lm'." +
                  "Input value was {:s}".format(repr(unit)))
  
          if (convention == 'power'):
              return mtse, sd
          elif (convention == 'energy'):
              return mtse * 4.0 * _np.pi, sd * 4.0 * _np.pi
          else:
              raise ValueError(
                  "convention must be 'power' or 'energy'." +
                  "Input value was {:s}".format(repr(convention)))
docs: Return the multitaper spectrum estimate and standard error for an
          input SHCoeffs class instance.