code: def cagr(returns, period=DAILY, annualization=None):
      """
      Compute compound annual growth rate.
  
      Parameters
      ----------
      returns : pd.Series or np.ndarray
          Daily returns of the strategy, noncumulative.
          - See full explanation in :func:`~empyrical.stats.cum_returns`.
      period : str, optional
          Defines the periodicity of the 'returns' data for purposes of
          annualizing. Value ignored if `annualization` parameter is specified.
          Defaults are:
              'monthly':12
              'weekly': 52
              'daily': 252
      annualization : int, optional
          Used to suppress default values available in `period` to convert
          returns into annual returns. Value should be the annual frequency of
          `returns`.
          - See full explanation in :func:`~empyrical.stats.annual_return`.
  
      Returns
      -------
      float, np.nan
          The CAGR value.
  
      """
      if len(returns) < 1:
          return np.nan
  
      ann_factor = annualization_factor(period, annualization)
      no_years = len(returns) / float(ann_factor)
      # Pass array to ensure index -1 looks up successfully.
      ending_value = cum_returns(
          np.asanyarray(returns), starting_value=1
      )[-1]
  
      return ending_value ** (1.0 / no_years) - 1
  
imports: from __future__ import division
  from functools import wraps
  import pandas
  import numpy
  from scipy import stats
  from six import iteritems
  from empyrical.utils import nanmean, nanstd, nanmin
label_desc: Use image node_id 26 for calling a global function with example usage: cagr(returns, period, annualization) and returns: unknown, np