code: def igamma(
      a: paddle.Tensor,
      /,
      *,
      x: paddle.Tensor,
      out: Optional[paddle.Tensor] = None,
  ) -> paddle.Tensor:
      results = []
      ret_dtype = a.dtype if out is None else out.dtype
      if paddle.float16 in [a.dtype, x.dtype]:
          a = a.astype("float32")
          x = x.astype("float32")
  
      for ai, xi in zip(a.flatten(), x.flatten()):
          ai = ai.astype("float64")
          xi = xi.astype("float64")
  
          def integrand(t):
              return paddle.exp(-t) * paddle.pow(t, ai - 1)
  
          intervals = paddle.linspace(0, xi, 10001).astype("float64")
          interval_width = xi / 10000
          values = integrand(intervals)
          integral = paddle.multiply(
              (values[:-1] + values[1:]) / 2, interval_width
          )
          result = paddle.divide(
              paddle.sum(integral), paddle.exp(paddle.lgamma(ai))
          )
          results.append(result)
  
      return paddle.to_tensor(results, dtype=ret_dtype).reshape(a.shape)
  
imports: from typing import Optional, Union, Tuple, Sequence, Any
  import paddle
  import ivy.functional.backends.paddle
  import ivy
  from copy import deepcopy
  from ivy.func_wrapper import with_unsupported_device_and_dtypes, with_supported_dtypes
  from .None import backend_version
label_desc: Use image node_id 17 for calling a global function with example usage: igamma() and returns: paddle, unknown