code: def nextafter(
      x1: paddle.Tensor,
      x2: paddle.Tensor,
      /,
      *,
      out: Optional[paddle.Tensor] = None,
  ) -> paddle.Tensor:
      x1, x2 = ivy.promote_types_of_inputs(x1, x2)
      with ivy.ArrayMode(False):
          eps = ivy.finfo(x1.dtype).eps
          return ivy.where(
              ivy.equal(x1, x2),
              x2,
              ivy.where(
                  ivy.greater(x2, x1),
                  ivy.add(x1, eps),
                  ivy.subtract(x1, eps),
              ),
          )
  
imports: import operator
  from typing import Optional, Union, Tuple, List, Sequence
  from numbers import Number
  import paddle
  from ivy.utils.exceptions import IvyNotImplementedException
  from ivy.func_wrapper import with_supported_dtypes, with_unsupported_device_and_dtypes, with_unsupported_dtypes
  import ivy.functional.backends.paddle
  import ivy
  from ivy import promote_types_of_inputs
  from ivy.functional.backends.paddle.elementwise import _elementwise_helper
  from ..None import backend_version
label_desc: Use image node_id 17 for calling a global function with example usage: nextafter() and returns: ivy