code: def test_error_invalid_object(data, all_arithmetic_operators):
      data, _ = data
  
      op = all_arithmetic_operators
      opa = getattr(data, op)
  
      # 2d -> return NotImplemented
      result = opa(pd.DataFrame({"A": data}))
      assert result is NotImplemented
  
      msg = r"can only perform ops with 1-d structures"
      with pytest.raises(NotImplementedError, match=msg):
          opa(np.arange(len(data)).reshape(-1, len(data)))
  
file_path: pandas/pandas/tests/arrays/masked/test_arithmetic.py
imports: from __future__ import annotations
  from typing import Any
  import numpy
  import pytest
  import pandas
  import pandas._testing
label_desc: Use image node_id 9 for calling a global function with example usage: test_error_invalid_object(data, all_arithmetic_operators) without return types