code: def ldexp(
      x1: Union[paddle.Tensor, Number],
      x2: Union[paddle.Tensor, Number],
      /,
      *,
      out: Optional[paddle.Tensor] = None,
  ) -> paddle.Tensor:
      out_dtype = x1.dtype
      x1, x2 = promote_types_of_inputs(x1, x2)
      with ivy.ArrayMode(False):
          if ivy.any(ivy.less(x2, 0)):
              pos_exp = ivy.greater_equal(x2, 0).astype(x2.dtype) * x2
              neg_exp = ivy.less(x2, 0).astype(x2.dtype) * x2
              ret = ivy.multiply(ivy.pow(2, pos_exp), x1)
              ret = ivy.divide(ret, ivy.pow(2, -neg_exp))
          else:
              ret = ivy.multiply(ivy.pow(2, x2), x1)
          return ivy.astype(ret, out_dtype, copy=False)
  
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 8 for calling a global function with example usage: ldexp() and returns: ivy