passed into "public_api".
Returns:
      Result from calling "implementation" or an "torch_function"
      method, as appropriate.
Return type:
      object
:raises TypeError : if no implementation is found.:
-[ Example ]-



def func(a):
   ...     if has_torch_function_unary(a):
   ...         return handle_torch_function(func, (a,), a)
   ...     return a + 0



torch.overrides.has_torch_function()
Check for torch_function implementations in the elements of an
   iterable or if a torch_function mode is enabled.  Considers
   exact "Tensor" s and "Parameter" s non-dispatchable.  Use this to
   guard a call to "handle_torch_function()"; don't use it to test if
   something is Tensor-like, use "is_tensor_like()" instead. :param
   relevant_args: Iterable or arguments to check for
   torch_function methods. :type relevant_args: iterable
Returns:
      True if any of the elements of relevant_args have
      torch_function implementations, False otherwise.