code: def sharpe_ratio(
      close: Series,
      benchmark_rate: float = 0.0,
      log: bool = False,
      use_cagr: bool = False,
      period: int = RATE["TRADING_DAYS_PER_YEAR"],
  ) -> float:
      """Sharpe Ratio of a series.
  
      Args:
          close (pd.Series): Series of 'close's
          benchmark_rate (float): Benchmark Rate to use. Default: 0.0
          log (bool): If True, calculates log_return. Otherwise it returns
              percent_return. Default: False
          use_cagr (bool): Use cagr - benchmark_rate instead. Default: False
          period (int, float): Period to use to calculate Mean Annual Return and
              Annual Standard Deviation.
              Default: RATE["TRADING_DAYS_PER_YEAR"] (currently 252)
  
      >>> result = ta.sharpe_ratio(close, benchmark_rate=0.0, log=False)
      """
      close = verify_series(close)
      returns = (
          percent_return(close=close)
          if not log
          else log_return(close=close)
      )
  
      if use_cagr:
          return cagr(close) / volatility(close, returns, log=log)
      else:
          period_mu = period * returns.mean()
          period_std = npSqrt(period) * returns.std()
          return (period_mu - benchmark_rate) / period_std
  
imports: from typing import Tuple
  from numpy import log
  from numpy import nan
  from numpy import sqrt
  from pandas import Series, Timedelta
  from ._core import verify_series
  from ._time import total_time
  from ._math import linear_regression, log_geometric_mean
  from pandas_ta import RATE
  from pandas_ta.performance import drawdown, log_return, percent_return
label_desc: Use image node_id 9 for calling a global function with example usage: sharpe_ratio(close, benchmark_rate, log, use_cagr, period) and returns: unknown, unknown