code: def test_calc_inv_vol_weights(df):
      prc = df.iloc[0:11]
      rets = prc.to_returns().dropna()
      actual = ffn.core.calc_inv_vol_weights(rets)
  
      assert len(actual) == 3
      assert "AAPL" in actual
      assert "MSFT" in actual
      assert "C" in actual
  
      aae(actual["AAPL"], 0.218, 3)
      aae(actual["MSFT"], 0.464, 3)
      aae(actual["C"], 0.318, 3)
  
imports: import ffn
  import pandas
  import numpy
  from pytest import fixture
  from numpy.testing import assert_almost_equal
label_desc: Use image node_id 18 for calling a global function with example usage: test_calc_inv_vol_weights(df) without return types