code: def stability_of_timeseries(returns):
      """
      Determines R-squared of a linear fit to the cumulative
      log returns. Computes an ordinary least squares linear fit,
      and returns R-squared.
  
      Parameters
      ----------
      returns : pd.Series
          Daily returns of the strategy, noncumulative.
          - See full explanation in :func:`~pyfolio.timeseries.cum_returns`.
  
      Returns
      -------
      float
          R-squared.
      """
  
      return ep.stability_of_timeseries(returns)
  
imports: from __future__ import division
  from collections import OrderedDict
  from functools import partial
  import empyrical
  import numpy
  import pandas
  import scipy
  import scipy.stats
  from sklearn import linear_model
  from .deprecate import deprecated
  from .interesting_periods import PERIODS
  from .txn import get_turnover
  from .utils import APPROX_BDAYS_PER_MONTH, APPROX_BDAYS_PER_YEAR
  from .utils import DAILY
label_desc: Use image node_id 13 for calling a global function with example usage: stability_of_timeseries(returns) and returns: ep