code: def fmax(
      x1: Union[ivy.Array, ivy.NativeArray],
      x2: Union[ivy.Array, ivy.NativeArray],
      /,
      *,
      out: Optional[Union[ivy.Array, ivy.NativeArray]] = None,
  ) -> Union[ivy.Array, ivy.NativeArray]:
      """Compute the element-wise maximums of two arrays. Differs from
      ivy.maximum in the case where one of the elements is NaN. ivy.maximum
      returns the NaN element while ivy.fmax returns the non-NaN element.
  
      Parameters
      ----------
      x1
          First input array.
      x2
          Second input array.
      out
          optional output array, for writing the result to.
  
      Returns
      -------
      ret
          Array with element-wise maximums.
  
      Examples
      --------
      >>> x1 = ivy.array([2, 3, 4])
      >>> x2 = ivy.array([1, 5, 2])
      >>> ivy.fmax(x1, x2)
      ivy.array([ 2.,  5.,  4.])
  
      >>> x1 = ivy.array([ivy.nan, 0, ivy.nan])
      >>> x2 = ivy.array([0, ivy.nan, ivy.nan])
      >>> ivy.fmax(x1, x2)
      ivy.array([ 0.,  0.,  nan])
      """
      return ivy.current_backend().fmax(x1, x2, out=out)
  
imports: from typing import Optional, Union, Tuple, List, Sequence
  from numbers import Number
  import ivy
  from ivy.func_wrapper import handle_out_argument, to_native_arrays_and_back, handle_nestable, handle_partial_mixed_function, handle_array_like_without_promotion, inputs_to_ivy_arrays, handle_array_function, infer_dtype, handle_device, handle_backend_invalid
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 5 for calling a global function with example usage: fmax() and returns: ivy