code: def test_sma():
      orig = np.array(
          [
              [np.nan, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5],
              [
                  np.nan,
                  0.5,
                  2.5,
                  6.5,
                  12.5,
                  20.5,
                  30.5,
                  42.5,
                  56.5,
                  72.5,
              ],
          ]
      )
      dforig = pd.DataFrame({"0": orig[0], "1": orig[1]}).dropna()
      l1 = range(10)
      l2 = [i**2 for i in range(10)]
      df = pd.DataFrame({"0": l1, "1": l2}).astype(np.float64)
      res = sma(df, span=2).dropna()
      assert all((dforig == res).all())
  
file_path: FinQuant/tests/test_moving_average.py
imports: import matplotlib.pyplot
  import numpy
  import pandas
  from finquant.moving_average import compute_ma, ema, ema_std, plot_bollinger_band, sma, sma_std
label_desc: Use image node_id 1 for calling a global function with example usage: test_sma() without return types