code: def test_plot(data):
      rhs = ["x", "y", "z"]
      lhs = "y"
      if isinstance(data, pd.DataFrame):
          rhs.remove(lhs)
          dep, exog = data[lhs], data[rhs]
      else:
          dep_loc = rhs.index(lhs)
          exog_locs = [0, 1, 2]
          exog_locs.remove(dep_loc)
          dep = data[:, dep_loc]
          exog = data[:, exog_locs]
      test = engle_granger(dep, exog)
      assert isinstance(test.plot(), plt.Figure)
  
file_path: arch/arch/tests/unitroot/test_engle_granger.py
imports: import numpy
  from numpy.testing import assert_allclose
  import pandas
  import pytest
  from statsmodels.iolib.summary import Summary
  from arch.unitroot._engle_granger import engle_granger_cv, engle_granger_pval
  from arch.unitroot._shared import ResidualCointegrationTestResult, _cross_section
  from arch.unitroot.cointegration import engle_granger
label_desc: Use image node_id 10 for calling a global function with example usage: test_plot(data) without return types