code: def test_MAVP():
      a = pl.Series([1, 5, 3, 4, 7, 3, 8, 1, 4, 6], dtype=pl.Float64)
      b = pl.Series([2, 4, 2, 4, 2, 4, 2, 4, 2, 4], dtype=pl.Float64)
      result = talib.MAVP(a, b, minperiod=2, maxperiod=4)
      assert isinstance(result, pl.Series)
      assert_array_equal(
          result.to_numpy(),
          [
              np.nan,
              np.nan,
              np.nan,
              3.25,
              5.5,
              4.25,
              5.5,
              4.75,
              2.5,
              4.75,
          ],
      )
      sma2 = talib.SMA(a, 2)
      assert isinstance(sma2, pl.Series)
      assert_array_equal(result.to_numpy()[4::2], sma2.to_numpy()[4::2])
      sma4 = talib.SMA(a, 4)
      assert isinstance(sma4, pl.Series)
      assert_array_equal(result.to_numpy()[3::2], sma4.to_numpy()[3::2])
      result = talib.MAVP(a, b, minperiod=2, maxperiod=3)
      assert isinstance(result, pl.Series)
      assert_array_equal(
          result.to_numpy(),
          [
              np.nan,
              np.nan,
              4,
              4,
              5.5,
              4.666666666666667,
              5.5,
              4,
              2.5,
              3.6666666666666665,
          ],
      )
      sma3 = talib.SMA(a, 3)
      assert isinstance(sma3, pl.Series)
      assert_array_equal(result.to_numpy()[2::2], sma2.to_numpy()[2::2])
      assert_array_equal(result.to_numpy()[3::2], sma3.to_numpy()[3::2])
  
file_path: ta-lib-python/tests/test_polars.py
imports: import numpy
  from numpy.testing import assert_array_equal
  import polars
  import talib
  from talib import abstract
label_desc: Use image node_id 2 for calling a global function with example usage: test_MAVP() without return types