code: def scales(self):
          
          if self.impl == 'pywt':
              if self.__variant == 'forward':
                  discr_space = self.domain
                  wavelet_space = self.range
              else:
                  discr_space = self.range
                  wavelet_space = self.domain
  
              shapes = pywt.wavedecn_shapes(discr_space.shape, self.pywt_wavelet,
                                            mode=self.pywt_pad_mode,
                                            level=self.nlevels, axes=self.axes)
              coeff_list = [np.full(shapes[0], 0)]
              for i in range(1, 1 + len(shapes[1:])):
                  coeff_list.append({k: np.full(shapes[i][k], i)
                                     for k in shapes[i].keys()})
              coeffs = pywt.ravel_coeffs(coeff_list, axes=self.axes)[0]
              return wavelet_space.element(coeffs)
          else:
              raise RuntimeError("bad `impl` '{}'".format(self.impl))
docs: Get the scales of each coefficient.
  
          Returns
          -------
          scales : ``range`` element
              The scale of each coefficient, given by an integer. 0 for the
              lowest resolution and self.nlevels for the highest.