code: def unsorted_segment_sum(
      data: np.ndarray,
      segment_ids: np.ndarray,
      num_segments: int,
  ) -> np.ndarray:
      # 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
      )
  
      res = np.zeros((num_segments,) + data.shape[1:], dtype=data.dtype)
  
      for i in range(num_segments):
          mask_index = segment_ids == i
          if np.any(mask_index):
              res[i] = np.sum(data[mask_index], axis=0)
  
      return res
  
file_path: ivy/ivy/functional/backends/numpy/experimental/creation.py
imports: from typing import Optional, Tuple, Sequence, Union
  import numpy
  import ivy
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