code: def calculate_lyapunov(self):
          
          if self._calculate_megno==0:
              raise RuntimeError("Lyapunov Characteristic Number cannot be calculated. Make sure to call init_megno() after adding all particles but before integrating the simulation.")
  
          clibrebound.reb_tools_calculate_lyapunov.restype = c_double
          return clibrebound.reb_tools_calculate_lyapunov(byref(self))
docs: Return the current Lyapunov Characteristic Number (LCN).
          Note that you need to call init_megno() before the start of the simulation.
          To get a timescale (the Lyapunov timescale), take the inverse of this quantity.