code: def test_ema():
      orig = np.array(
          [
              [
                  np.nan,
                  0.6666666666666666,
                  1.5555555555555556,
                  2.5185185185185186,
                  3.506172839506173,
                  4.502057613168724,
                  5.500685871056241,
                  6.500228623685413,
                  7.5000762078951375,
                  8.500025402631714,
              ],
              [
                  np.nan,
                  0.6666666666666666,
                  2.888888888888889,
                  6.962962962962963,
                  12.987654320987653,
                  20.99588477366255,
                  30.998628257887518,
                  42.99954275262917,
                  56.99984758420972,
                  72.99994919473657,
              ],
          ]
      )
      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 = ema(df, span=2).dropna()
      assert all((abs(dforig - res) <= 1e-15).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 2 for calling a global function with example usage: test_ema() without return types