code: def test_ufunc_with_2args(ufunc, make_pandas_input):
      dafunc = getattr(da, ufunc)
      npfunc = getattr(np, ufunc)
  
      pandas1 = make_pandas_input()
      pandas2 = make_pandas_input()
  
      dask1 = dd.from_pandas(pandas1, 3)
      dask2 = dd.from_pandas(pandas2, 4)
  
      pandas_type = pandas1.__class__
      dask_type = dask1.__class__
  
      # applying Dask ufunc doesn't trigger computation
      assert isinstance(dafunc(dask1, dask2), dask_type)
      assert_eq(dafunc(dask1, dask2), npfunc(pandas1, pandas2))
  
      # should be fine with pandas as a second arg, too
      assert isinstance(dafunc(dask1, pandas2), dask_type)
      assert_eq(dafunc(dask1, pandas2), npfunc(pandas1, pandas2))
  
      # applying NumPy ufunc is lazy
      if isinstance(npfunc, np.ufunc):
          assert isinstance(npfunc(dask1, dask2), dask_type)
          assert isinstance(npfunc(dask1, pandas2), dask_type)
      else:
          assert isinstance(npfunc(dask1, dask2), pandas_type)
          assert isinstance(npfunc(dask1, pandas2), pandas_type)
  
      assert_eq(npfunc(dask1, dask2), npfunc(pandas1, pandas2))
      assert_eq(npfunc(dask1, pandas2), npfunc(pandas1, pandas2))
  
      # applying Dask ufunc to normal Series triggers computation
      assert isinstance(dafunc(pandas1, pandas2), pandas_type)
      assert_eq(dafunc(pandas1, pandas2), npfunc(pandas1, pandas2))
  
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 4 for calling a global function with example usage: test_ufunc_with_2args(ufunc, make_pandas_input) without return types