docs: def find_period(y, Tapprox):
      """ Find oscillation period of y(t).
  
      Parameter Tapprox is the approximate period. The code finds the time
      between 0.7 * Tapprox and 1.3 * Tapprox where y(t)[1] = d/dt theta(t)
      vanishes. This is the period.
      """
      def dtheta_dt(t):
          """ vanishes when dtheta/dt = 0 """
          return y(t)[1]
      return  gv.root.refine(dtheta_dt, (0.7 * Tapprox, 1.3 * Tapprox))