code: def _array_ufunc(_, ufunc, method, *inputs, **kwargs):
      out = kwargs.get("out", tuple())
      for x in inputs + out:
          if not _check_arg(x):
              return NotImplemented
  
      if ufunc.signature is not None:
          return NotImplemented
      if ufunc not in UFUNC_TO_TENSOR_FUNCS:
          return NotImplemented
  
      # we delegate numpy ufunc to tensor ufunc,
      # tensor ufunc will handle Mars DataFrame properly.
      try:
          tensor_func = getattr(UFUNC_TO_TENSOR_FUNCS[ufunc], method)
          return tensor_func(*inputs, **kwargs)
      except (AttributeError, NotImplementedError):
          return NotImplemented
  
imports: from numbers import Number
  from ...tensor import tensor
  from ...tensor.ufunc.ufunc import UFUNC_TO_TENSOR_FUNCS
  from ..core import DATAFRAME_TYPE, SERIES_TYPE
label_desc: Use image node_id 2 for calling a global function with example usage: _array_ufunc(_, ufunc, method) and returns: NotImplemented, NotImplemented, tensor_func, NotImplemented, NotImplemented