code: def check_unsorted_segment_valid_params(
      data, segment_ids, num_segments
  ):
      if not isinstance(num_segments, int):
          raise TypeError("num_segments must be of integer type")
  
      valid_dtypes = [
          ivy.int32,
          ivy.int64,
      ]
  
      if ivy.backend == "torch":
          import torch
  
          valid_dtypes = [
              torch.int32,
              torch.int64,
          ]
          if isinstance(num_segments, torch.Tensor):
              num_segments = num_segments.item()
      elif ivy.backend == "paddle":
          import paddle
  
          valid_dtypes = [
              paddle.int32,
              paddle.int64,
          ]
          if isinstance(num_segments, paddle.Tensor):
              num_segments = num_segments.item()
  
      if segment_ids.dtype not in valid_dtypes:
          raise TypeError("segment_ids must have an integer dtype")
  
      if data.shape[0] != segment_ids.shape[0]:
          raise ValueError(
              "The length of segment_ids should be equal to data.shape[0]."
          )
  
      if ivy.max(segment_ids) >= num_segments:
          error_message = (
              f"segment_ids[{ivy.argmax(segment_ids)}] = "
              f"{ivy.max(segment_ids)} is out of range [0, {num_segments})"
          )
          raise ValueError(error_message)
      if num_segments <= 0:
          raise ValueError("num_segments must be positive")
  
imports: import ivy
label_desc: Use image node_id 15 for calling a global function with example usage: check_unsorted_segment_valid_params(data, segment_ids, num_segments) without return types