code: def test_invalid_update(self):
      df = DataFrame({"a": range(5), "b": range(5)})
      online_ewm = df.head(2).ewm(0.5).online()
      with pytest.raises(
          ValueError,
          match="Must call mean with update=None first before passing update",
      ):
          online_ewm.mean(update=df.head(1))
  
file_path: pandas/pandas/tests/window/test_online.py
imports: import numpy
  import pytest
  from pandas import DataFrame, Series
  import pandas._testing
label_desc: Use image node_id 1 for calling the TestEWM obj's underlying member method code with example usage: obj.test_invalid_update() without return types