code: def test_binary_ufunc_index_array(ufunc, reflect):
      N = 100
      # Avoid zeros in either array to skip division by 0 errors. Also limit the
      # scale to avoid issues with overflow, etc. We use ints because some
      # operations (like bitwise ops) are not defined for floats.
      args = [cudf.Index(cp.random.rand(N)) for _ in range(ufunc.nin)]
  
      arg1 = args[1].to_cupy()
  
      if reflect:
          got = ufunc(arg1, args[0])
          expect = ufunc(args[1].to_numpy(), args[0].to_pandas())
      else:
          got = ufunc(args[0], arg1)
          expect = ufunc(args[0].to_pandas(), args[1].to_numpy())
  
      if ufunc.nout > 1:
          for g, e in zip(got, expect):
              if reflect:
                  assert (cp.asnumpy(g) == e).all()
              else:
                  assert_eq(g, e, check_exact=False)
      else:
          if reflect:
              assert (cp.asnumpy(got) == expect).all()
          else:
              assert_eq(got, expect, check_exact=False)
  
file_path: cudf/python/cudf/cudf/tests/test_array_ufunc.py
imports: import operator
  import warnings
  from contextlib import contextmanager
  from functools import reduce
  import cupy
  import numpy
  import pytest
  import cudf
  from cudf.core._compat import PANDAS_GE_150
  from cudf.testing._utils import assert_eq, set_random_null_mask_inplace
label_desc: Use image node_id 3 for calling a global function with example usage: test_binary_ufunc_index_array(ufunc, reflect) without return types