code: def test_array_ufuncs_for_many_arguments():
      # GH39853
      def add3(x, y, z):
          return x + y + z
  
      ufunc = np.frompyfunc(add3, 3, 1)
      ser = pd.Series([1, 2])
  
      result = ufunc(ser, ser, 1)
      expected = pd.Series([3, 5], dtype=object)
      tm.assert_series_equal(result, expected)
  
      df = pd.DataFrame([[1, 2]])
  
      msg = (
          "Cannot apply ufunc <ufunc 'add3 (vectorized)'> "
          "to mixed DataFrame and Series inputs."
      )
      with pytest.raises(NotImplementedError, match=re.escape(msg)):
          ufunc(ser, ser, df)
  
imports: from collections import deque
  import re
  import string
  import numpy
  import pytest
  import pandas.util._test_decorators
  import pandas
  import pandas._testing
  from pandas.arrays import SparseArray
label_desc: Use image node_id 18 for calling a global function with example usage: test_array_ufuncs_for_many_arguments() and returns: unknown