code: def get_rmetric( self, mode_inv = 'svd', return_svd = False ):
          
          if self.H is None:
              self.H, self.G, self.Hvv, self.Hsval = riemann_metric(self.Y, self.L, self.mdimG, invert_h = True, mode_inv = mode_inv)
          if self.G is None:
              self.G, self.Hvv, self.Hsvals,  self.Gsvals = compute_G_from_H( self.H, mode_inv = self.mode_inv )
          if mode_inv is 'svd' and return_svd:
              return self.G, self.Hvv, self.Hsvals, self.Gsvals
          else:
              return self.G
docs: Compute the Reimannian Metric