code: def calculate_potential(self, t=None,
                              t_max=100, plot_optimal_t=False, ax=None):
          
          if t is None:
              t = self.t
          if self.diff_potential is None:
              if t == 'auto':
                  t = self.optimal_t(t_max=t_max, plot=plot_optimal_t, ax=ax)
              else:
                  t = self.t
              tasklogger.log_start("diffusion potential")
              # diffused diffusion operator
              diff_op_t = np.linalg.matrix_power(self.diff_op, t)
              if self.gamma == 1:
                  # handling small values
                  diff_op_t = diff_op_t + 1e-7
                  self.diff_potential = -1 * np.log(diff_op_t)
              elif self.gamma == -1:
                  self.diff_potential = diff_op_t
              else:
                  c = (1 - self.gamma) / 2
                  self.diff_potential = ((diff_op_t)**c) / c
              tasklogger.log_complete("diffusion potential")
          elif plot_optimal_t:
              self.optimal_t(t_max=t_max, plot=plot_optimal_t, ax=ax)
  
          return self.diff_potential
docs: Calculates the diffusion potential
  
          Parameters
          ----------
  
          t : int
              power to which the diffusion operator is powered
              sets the level of diffusion
  
          t_max : int, default: 100
              Maximum value of `t` to test
  
          plot_optimal_t : boolean, default: False
              If true, plots the Von Neumann Entropy and knee point
  
          ax : matplotlib.Axes, default: None
              If plot=True and ax is not None, plots the VNE on the given axis
              Otherwise, creates a new axis and displays the plot
  
          Returns
          -------
  
          diff_potential : array-like, shape=[n_samples, n_samples]
              The diffusion potential fit on the input data