code: def _calculate_sigma(residuals, n):
      if n > 0:
          sigma = np.nansum(residuals**2)
          sigma = sigma / n
          sigma = np.sqrt(sigma)
      else:
          sigma = 0
      return sigma
  
file_path: statsforecast/statsforecast/utils.py
imports: from typing import Dict
  import math
  import os
  import warnings
  import numpy
  import pandas
  from scipy.stats import norm
  from utilsforecast.compat import DataFrame
  from utilsforecast.data import generate_series
label_desc: Use image node_id 8 for calling a global function with example usage: _calculate_sigma(residuals, n) and returns: sigma