code: def test_float_lastheavy():
      weights = [0.0, 1.1, 1.9, 3.0, 30.0]
      P = 2
      parts = partition_balanced(weights, P)
      assert_valid_partition(weights, parts, P)
      assert parts == [0, 4, 5]
  
imports: import pytest
  import torch
  import deepspeed.comm
  from deepspeed.runtime.utils import partition_uniform
  from deepspeed.runtime.utils import partition_balanced
  from deepspeed.runtime.utils import prefix_sum_inc
  from deepspeed.runtime.utils import PartitionedTensor
  from deepspeed.accelerator import get_accelerator
  from unit.common import DistributedTest
label_desc: Use image node_id 11 for calling a global function with example usage: test_float_lastheavy() without return types