code: def test_weighted_daily_mean_returns():
      l1 = [1.0, 1.5, 2.25, 3.375]
      l2 = [1.0, 2.0, 4.0, 8.0]
      expected = [0.5 * 0.25 + 1 * 0.75 for i in range(len(l1) - 1)]
      weights = np.array([0.25, 0.75])
      d = {"1": l1, "2": l2}
      df = pd.DataFrame(d)
      ret = weighted_mean_daily_returns(df, weights)
      assert all(abs(ret - expected) <= 1e-15)
  
      d = {"1": l1}
      expected = [0.5 for i in range(len(l1) - 1)]
      df = pd.DataFrame(d)
      ret = weighted_mean_daily_returns(df, np.array([1.0]))
      assert all(abs(ret - expected) <= 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 3 for calling a global function with example usage: test_weighted_daily_mean_returns() without return types