code: def test_boolean():
      # There can be 9*9 test cases in full mapping of the cartesian product.
      # But we only consider 3*3 cases for simplicity.
      s = [
          intervalMembership(False, False),
          intervalMembership(None, None),
          intervalMembership(True, True),
      ]
  
      # Reduced tests for 'And'
      a1 = [
          intervalMembership(False, False),
          intervalMembership(False, False),
          intervalMembership(False, False),
          intervalMembership(False, False),
          intervalMembership(None, None),
          intervalMembership(None, None),
          intervalMembership(False, False),
          intervalMembership(None, None),
          intervalMembership(True, True),
      ]
      a1_iter = iter(a1)
      for i in range(len(s)):
          for j in range(len(s)):
              assert s[i] & s[j] == next(a1_iter)
  
      # Reduced tests for 'Or'
      a1 = [
          intervalMembership(False, False),
          intervalMembership(None, False),
          intervalMembership(True, False),
          intervalMembership(None, False),
          intervalMembership(None, None),
          intervalMembership(True, None),
          intervalMembership(True, False),
          intervalMembership(True, None),
          intervalMembership(True, True),
      ]
      a1_iter = iter(a1)
      for i in range(len(s)):
          for j in range(len(s)):
              assert s[i] | s[j] == next(a1_iter)
  
      # Reduced tests for 'Xor'
      a1 = [
          intervalMembership(False, False),
          intervalMembership(None, False),
          intervalMembership(True, False),
          intervalMembership(None, False),
          intervalMembership(None, None),
          intervalMembership(None, None),
          intervalMembership(True, False),
          intervalMembership(None, None),
          intervalMembership(False, True),
      ]
      a1_iter = iter(a1)
      for i in range(len(s)):
          for j in range(len(s)):
              assert s[i] ^ s[j] == next(a1_iter)
  
      # Reduced tests for 'Not'
      a1 = [
          intervalMembership(True, False),
          intervalMembership(None, None),
          intervalMembership(False, True),
      ]
      a1_iter = iter(a1)
      for i in range(len(s)):
          assert ~s[i] == next(a1_iter)
  
file_path: sympy/sympy/plotting/intervalmath/tests/test_interval_membership.py
imports: from sympy.core.symbol import Symbol
  from sympy.plotting.intervalmath import interval
  from sympy.plotting.intervalmath.interval_membership import intervalMembership
  from sympy.plotting.experimental_lambdify import experimental_lambdify
  from sympy.testing.pytest import raises
label_desc: Use image node_id 6 for calling a global function with example usage: test_boolean() without return types