code: def test_lag_corr(ser, lags):
      df_lags, df_corr = lag_corr(ser, lags=lags).result
      assert isinstance(df_lags, pd.DataFrame)
      assert isinstance(df_corr, pd.Series)
      assert df_lags.columns[0] == "original"
      for col in df_lags.columns[1:]:
          assert col.startswith("lag ")
          lag = int(re.sub("[^0-9]", "", col))
          assert df_lags[col].equals(ser.shift(lag))
      assert (df_corr.dropna() <= 1.0).all()
      assert (df_corr.dropna() >= -1.0).all()
      assert df_corr.index.tolist() == df_lags.columns.tolist()
  
file_path: tslumen/tests/unit/profile/test_correlation.py
imports: import pytest
  import mock
  import re
  from tests.unit.profile.base import *
  from tslumen.profile.correlation import acf, acf_1d, acf_2d, pacf, pacf_1d, pacf_2d, lag_corr, corr_pearson, corr_kendall, corr_spearman, granger_causality
label_desc: Use image node_id 3 for calling a global function with example usage: test_lag_corr(ser, lags) without return types