code: def test_exog_predict(self):
      rfile = os.path.join(rpath, "test_lowess_simple.csv")
      test_data = np.genfromtxt(
          open(rfile, "rb"), delimiter=",", names=True
      )
      y, x = test_data["y"], test_data["x"]
      target = lowess(y, x, is_sorted=True)
  
      # Test specifying exog_predict explicitly
      perm_idx = np.arange(len(x) // 2)
      np.random.shuffle(perm_idx)
      actual_lowess = lowess(y, x, xvals=x[perm_idx], missing="none")
      assert_almost_equal(
          target[perm_idx, 1], actual_lowess, decimal=13
      )
  
      target_it0 = lowess(y, x, return_sorted=False, it=0)
      actual_lowess2 = lowess(y, x, xvals=x[perm_idx], it=0)
      assert_almost_equal(
          target_it0[perm_idx], actual_lowess2, decimal=13
      )
  
      # Check nans in exog_predict
      with pytest.raises(ValueError):
          lowess(y, x, xvals=np.array([np.nan, 5, 3]), missing="raise")
  
      # With is_sorted=True
      actual_lowess3 = lowess(y, x, xvals=x, is_sorted=True)
      assert_equal(actual_lowess3, target[:, 1])
  
      # check with nans,  this changes the arrays
      y[[5, 6]] = np.nan
      x[3] = np.nan
      target = lowess(y, x, is_sorted=True)
  
      # Test specifying exog_predict explicitly, now with nans
      perm_idx = np.arange(target.shape[0])
      actual_lowess1 = lowess(y, x, xvals=target[perm_idx, 0])
      assert_almost_equal(
          target[perm_idx, 1], actual_lowess1, decimal=13
      )
  
      # nans and missing='drop'
      actual_lowess2 = lowess(y, x, xvals=x, missing="drop")
      all_finite = np.isfinite(x) & np.isfinite(y)
      assert_equal(actual_lowess2[all_finite], target[:, 1])
  
      # Dimensional check
      with pytest.raises(ValueError):
          lowess(y, x, xvals=np.array([[5], [10]]))
  
imports: import os
  import numpy
  from numpy.testing import assert_, assert_allclose, assert_almost_equal, assert_equal, assert_raises
  import pytest
  from statsmodels.nonparametric.smoothers_lowess import lowess
  import pandas
label_desc: Use image node_id 16 for calling the TestLowess obj's underlying member method code with example usage: obj.test_exog_predict() without return types