code: def check_partition(weights, num_parts, target_diff):
      result = ds_utils.partition_balanced(
          weights=weights, num_parts=num_parts
      )
  
      parts_sum = []
      for b, e in zip(result[:-1], result[1:]):
          parts_sum.append(sum(weights[b:e]))
  
      assert (
          max(parts_sum) - min(parts_sum) == target_diff
      ), f"ds_utils.partition_balanced(weights={weights}, num_parts={num_parts}) return {result}"
  
label_desc: Use image node_id 1 for calling a global function with example usage: check_partition(weights, num_parts, target_diff) without return types