code: def unsorted_segment_sum(
      data: paddle.Tensor,
      segment_ids: paddle.Tensor,
      num_segments: Union[int, paddle.Tensor],
  ) -> paddle.Tensor:
      # Used the same check which is used for unsorted_segment_min as the
      # check should be same
      # Might require to change the assertion function name to
      # check_unsorted_segment_valid_params
      ivy.utils.assertions.check_unsorted_segment_valid_params(
          data, segment_ids, num_segments
      )
  
      # Sum computation in paddle does not support int32, so needs to
      # be converted to float32
      needs_conv = False
      if data.dtype == paddle.int32:
          data = paddle.cast(data, "float32")
          needs_conv = True
  
      res = paddle.zeros(
          (num_segments,) + tuple(data.shape[1:]), dtype=data.dtype
      )
  
      for i in range(num_segments):
          mask_index = segment_ids == i
          if paddle.any(mask_index):
              res[i] = paddle.sum(data[mask_index], axis=0)
  
      # condition for converting float32 back to int32
      if needs_conv is True:
          res = paddle.cast(res, "int32")
  
      return res
  
file_path: ivy/ivy/functional/backends/paddle/experimental/creation.py
imports: from typing import Optional, Tuple, Union
  import math
  import paddle
  import ivy.functional.backends.paddle
  from paddle.device import core
  from ivy.func_wrapper import with_supported_dtypes, with_unsupported_device_and_dtypes
  import ivy
  from ..None import backend_version
label_desc: Use image node_id 8 for calling a global function with example usage: unsorted_segment_sum(data, segment_ids, num_segments) and returns: res