code: def test_ewma_halflife_without_times(halflife_with_times):
      msg = "halflife can only be a timedelta convertible argument if times is not None."
      with pytest.raises(ValueError, match=msg):
          Series(range(5)).ewm(halflife=halflife_with_times)
  
imports: import numpy
  import pytest
  from pandas import DataFrame, DatetimeIndex, Series, date_range
  import pandas._testing
label_desc: Use image node_id 6 for calling a global function with example usage: test_ewma_halflife_without_times(halflife_with_times) without return types