Write a function to calculate the Sharpe Ratio given a series of returns. Treat the risk-free rate as zero and use the arithmetic mean divided by the sample standard deviation. The function should accept a non-empty list of numeric periodic returns and return a float; return 0.0 when fewer than two returns or when all returns are identical.
0.0 when len(returns) < 2 or volatility is zerodef calculate_sharpe_ratio(returns):