code: def test_ewma_halflife_not_correct_type():
      msg = "halflife must be a timedelta convertible object"
      with pytest.raises(ValueError, match=msg):
          Series(range(5)).ewm(
              halflife=1, times=np.arange(5).astype("datetime64[ns]")
          )
  
imports: import numpy
  import pytest
  from pandas import DataFrame, DatetimeIndex, Series, date_range
  import pandas._testing
label_desc: Use image node_id 5 for calling a global function with example usage: test_ewma_halflife_not_correct_type() without return types