code: def max_drawdown(returns):
      """
      Determines the maximum drawdown of a strategy.
  
      Parameters
      ----------
      returns : pd.Series or np.ndarray
          Daily returns of the strategy, noncumulative.
          - See full explanation in :func:`~empyrical.stats.cum_returns`.
  
      Returns
      -------
      float
          Maximum drawdown.
  
      Note
      -----
      See https://en.wikipedia.org/wiki/Drawdown_(economics) for more details.
      """
  
      if len(returns) < 1:
          return np.nan
  
      cumulative = cum_returns(returns, starting_value=100)
      max_return = np.fmax.accumulate(cumulative)
      return nanmin((cumulative - max_return) / max_return)
  
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 8 for calling a global function with example usage: max_drawdown(returns) and returns: nanmin, np