code: def test_cumulative_returns():
      orig = [
          list(range(10)),
          [
              0.0,
              -0.025,
              -0.05,
              -0.075,
              -0.1,
              -0.125,
              -0.15,
              -0.175,
              -0.2,
              -0.225,
          ],
      ]
      l1 = np.array(range(1, 11)).astype(np.float64)
      l2 = [float(40 - i) for i in range(10)]
      d = {"1": l1, "2": l2}
      df = pd.DataFrame(d)
      ret = cumulative_returns(df)
      assert isinstance(ret, pd.DataFrame) and not ret.empty
      assert all(abs(ret["1"].values - orig[0]) <= 1e-15)
      assert all(abs(ret["2"].values - orig[1]) <= 1e-15)
      # with dividend of 0.2
      orig = [
          [0.2 + i for i in range(10)],
          [
              0.005,
              -0.02,
              -0.045,
              -0.07,
              -0.095,
              -0.12,
              -0.145,
              -0.17,
              -0.195,
              -0.22,
          ],
      ]
      ret = cumulative_returns(df, 0.2)
      assert isinstance(ret, pd.DataFrame) and not ret.empty
      assert all(abs(ret["1"].values - orig[0]) <= 1e-15)
      assert all(abs(ret["2"].values - orig[1]) <= 1e-15)
  
file_path: FinQuant/tests/test_returns.py
imports: import numpy
  import pandas
  from finquant.returns import cumulative_returns, daily_log_returns, daily_returns, historical_mean_return, weighted_mean_daily_returns
label_desc: Use image node_id 1 for calling a global function with example usage: test_cumulative_returns() without return types