code: def _rotate(self, angles, dj_matrix, gm=None, r0=None, omega=None):
          
          if dj_matrix is None:
              dj_matrix = _shtools.djpi2(self.lmax + 1)
  
          # The coefficients need to be 4pi normalized with csphase = 1
          coeffs = _shtools.SHRotateRealCoef(
              self.to_array(normalization='4pi', csphase=1), angles, dj_matrix)
  
          # Convert 4pi normalized coefficients to the same normalization
          # as the unrotated coefficients.
          if self.normalization != '4pi' or self.csphase != 1:
              temp = _convert(coeffs, normalization_in='4pi', csphase=1,
                              normalization_out=self.normalization,
                              csphase_out=self.csphase)
              return SHGravCoeffs.from_array(
                  temp, normalization=self.normalization,
                  csphase=self.csphase, copy=False, gm=gm, r0=r0, omega=omega)
          else:
              return SHGravCoeffs.from_array(coeffs, gm=gm, r0=r0, omega=omega,
                                             copy=False)
docs: Rotate the coefficients by the Euler angles alpha, beta, gamma.