code: def test_error_both_scalar(operation):
      msg = r"Either `left` or `right` need to be a np\.ndarray."
      with pytest.raises(TypeError, match=msg):
          # masks need to be non-None, otherwise it ends up in an infinite recursion
          operation(True, True, np.zeros(1), np.zeros(1))
  
imports: import operator
  import numpy
  import pytest
  import pandas
  import pandas._testing
  from pandas.arrays import BooleanArray
  from pandas.core.ops.mask_ops import kleene_and, kleene_or, kleene_xor
  from pandas.tests.extension.base import BaseOpsUtil
label_desc: Use image node_id 1 for calling a global function with example usage: test_error_both_scalar(operation) without return types