code: def test_acf(fnmock, fn, diff, kwargs, call_with):
      path = f"tslumen.profile.correlation.sms.{fnmock}"
  
      with mock.patch(path, autospec=True) as fun:
          fun.return_value = (
              np.arange(40),
              np.array([np.arange(40), np.arange(40)]).T,
          )
          ser = mkser(120)
          serd = pd.Series(
              np.diff(ser.values, diff), index=ser.index[diff:]
          )
          actual = fn(ser, **kwargs).result
          assert isinstance(actual, pd.DataFrame)
          assert actual.columns.tolist() == [
              "lag",
              "correlation",
              "low",
              "up",
          ]
          assert actual.lag.tolist() == list(range(40))
          assert actual.correlation.tolist() == list(range(40))
          assert actual.low.tolist()[1:] == [0.0] * 39
          assert actual.up.tolist()[1:] == [0.0] * 39
          assert np.isnan(actual.low[0])
          assert np.isnan(actual.up[0])
          assert fun.call_count == 1
          assert fun.call_args[0][0].equals(serd)
          call_args = fun.call_args[1]
          for par, val in call_with.items():
              assert par in call_args
              assert call_args[par] == val
  
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 2 for calling a global function with example usage: test_acf(fnmock, fn, diff, kwargs, call_with) without return types