docs: def fmt_chi2(f):
      """ Return string containing ``chi**2/dof``, ``dof`` and ``Q`` from ``f``.
  
      Assumes ``f`` has attributes ``chi2``, ``dof`` and ``Q``. The
      logarithm of the Bayes factor will also be printed if ``f`` has
      attribute ``logGBF``.
      """
      if hasattr(f, 'logGBF'):
          fmt = "chi2/dof = %.2g [%d]    Q = %.2g    log(GBF) = %.5g"
          chi2_dof = f.chi2 / f.dof if f.dof != 0 else 0
          return fmt % (chi2_dof, f.dof, f.Q, f.logGBF)
      else:
          fmt = "chi2/dof = %.2g [%d]    Q = %.2g"
          chi2_dof = f.chi2 / f.dof if f.dof != 0 else 0
          return fmt % (chi2_dof, f.dof, f.Q)