code: def test_impute_with_lags_multi():
      """Tests `impute_with_lags_multi`"""
      df = pd.DataFrame(
          {
              "a": (0.0, np.nan, -1.0, 1.0),
              "b": (np.nan, 2.0, np.nan, np.nan),
              "c": (2.0, 3.0, np.nan, 9.0),
              "d": (np.nan, 4.0, -4.0, 16.0),
          }
      )
  
      # tests `cols = None`
      impute_info = impute_with_lags_multi(
          df=df, orders=[1], agg_func=np.mean, iter_num=1, cols=None
      )
      expected = pd.DataFrame(
          {
              "a": (0.0, 0.0, -1.0, 1.0),
              "b": (np.nan, 2.0, 2.0, np.nan),
              "c": (2.0, 3.0, 3.0, 9.0),
              "d": (np.nan, 4.0, -4.0, 16.0),
          }
      )
      assert_equal(impute_info["df"], expected)
      assert impute_info["missing_info"] == {
          "a": {"initial_missing_num": 1, "final_missing_num": 0},
          "b": {"initial_missing_num": 3, "final_missing_num": 2},
          "c": {"initial_missing_num": 1, "final_missing_num": 0},
          "d": {"initial_missing_num": 1, "final_missing_num": 1},
      }
  
      # tests `cols = list`
      impute_info = impute_with_lags_multi(
          df=df,
          orders=[1],
          agg_func=np.mean,
          iter_num=2,
          cols=["b", "c", "d"],
      )
      expected = pd.DataFrame(
          {
              "a": (0.0, np.nan, -1.0, 1.0),  # not imputed
              "b": (
                  np.nan,
                  2.0,
                  2.0,
                  2.0,
              ),  # imputed in second iteration
              "c": (2.0, 3.0, 3.0, 9.0),
              "d": (np.nan, 4.0, -4.0, 16.0),
          }
      )
      assert_equal(impute_info["df"], expected)
      assert impute_info["missing_info"] == {
          "b": {"initial_missing_num": 3, "final_missing_num": 1},
          "c": {"initial_missing_num": 1, "final_missing_num": 0},
          "d": {"initial_missing_num": 1, "final_missing_num": 1},
      }
  
imports: import numpy
  import pandas
  from greykite.common.features.timeseries_impute import impute_with_lags
  from greykite.common.features.timeseries_impute import impute_with_lags_multi
  from greykite.common.python_utils import assert_equal
label_desc: Use image node_id 2 for calling a global function with example usage: test_impute_with_lags_multi() without return types