code: def test_execute_masked_binary(op, ty):
      @cuda.jit(device=True)
      def func(x, y):
          return op(x, y)
  
      @cuda.jit
      def test_kernel(x, y, err):
          # Reference result with unmasked value
          u = func(x, y)
  
          # Construct masked values to test with
          x0, y0 = Masked(x, False), Masked(y, False)
          x1, y1 = Masked(x, True), Masked(y, True)
  
          # Call with masked types
          r0 = func(x0, y0)
          r1 = func(x1, y1)
  
          # Check masks are as expected, and unmasked result matches masked
          # result
          if r0.valid:
              # TODO: ideally, we would raise an exception here rather
              # than return an "error code", and that is what the
              # previous version of this (and below) tests did. But,
              # Numba kernels cannot currently use `debug=True` with
              # CUDA enhanced compatibility.  Once a solution to that is
              # reached, we should switch back to raising exceptions
              # here.
              err[0] = 1
          if not r1.valid:
              err[0] = 2
          if u != r1.value:
              err[0] = 3
  
      err = cp.asarray([0], dtype="int8")
      with _CUDFNumbaConfig():
          test_kernel[1, 1](1, 2, err)
      assert err[0] == 0
  
imports: import operator
  import cupy
  import numpy
  import pytest
  from numba import cuda, types
  from numba.cuda import compile_ptx
  from numba.np.numpy_support import from_dtype
  from cudf import NA
  from cudf.core.udf.api import Masked
  from cudf.core.udf.masked_typing import MaskedType
  from cudf.testing._utils import parametrize_numeric_dtypes_pairwise
  from cudf.utils._numba import _CUDFNumbaConfig
label_desc: Use image node_id 2 for calling a global function with example usage: test_execute_masked_binary(op, ty) and returns: op