code: def test_accumulators_disallowed(self, func):
      # GH#50297
      arr = DatetimeArray._from_sequence(
          [
              "2000-01-01",
              "2000-01-02",
          ],
          dtype="M8[ns]",
      )._with_freq("infer")
      with pytest.raises(TypeError, match=f"Accumulation {func}"):
          arr._accumulate(func)
  
imports: import pytest
  import pandas._testing
  from pandas.core.arrays import DatetimeArray
label_desc: Use image node_id 2 for calling the TestAccumulator obj's underlying member method code with example usage: obj.test_accumulators_disallowed(func) without return types