code: def test_xvals_dtype(reset_randomstate):
      y = [0] * 10 + [1] * 10
      x = np.arange(20)
      # Previously raised ValueError: Buffer dtype mismatch
      results_xvals = lowess(y, x, frac=0.4, xvals=x[:5])
      assert_allclose(results_xvals, np.zeros(5), atol=1e-12)
  
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 2 for calling a global function with example usage: test_xvals_dtype(reset_randomstate) without return types