code: def test_2args_with_array(ufunc, pandas, darray):
      dafunc = getattr(da, ufunc)
      npfunc = getattr(np, ufunc)
  
      dask = dd.from_pandas(pandas, 2)
      dask_type = dask.__class__
  
      # applying Dask ufunc doesn't trigger computation
      assert isinstance(dafunc(dask, darray), dask_type)
      assert isinstance(dafunc(darray, dask), dask_type)
  
      np.testing.assert_array_equal(
          dafunc(dask, darray).compute().values,
          npfunc(pandas.values, darray).compute(),
      )
  
      # applying NumPy ufunc is lazy
      assert isinstance(npfunc(dask, darray), dask_type)
      assert isinstance(npfunc(darray, dask), dask_type)
  
      np.testing.assert_array_equal(
          npfunc(dask, darray).compute().values,
          npfunc(pandas.values, darray.compute()),
      )
      np.testing.assert_array_equal(
          npfunc(darray, dask).compute().values,
          npfunc(darray.compute(), pandas.values),
      )
  
file_path: dask/dask/dataframe/tests/test_ufunc.py
imports: from __future__ import annotations
  import warnings
  import pytest
  import numpy
  import dask.array
  import dask.dataframe
  from dask.dataframe.utils import assert_eq
label_desc: Use image node_id 9 for calling a global function with example usage: test_2args_with_array(ufunc, pandas, darray) without return types