code: def _balance_cost(cost: List[int], partitions: int) -> List[int]:
      partitioned = blockpartition.solve(cost, partitions)
      return [len(p) for p in partitioned]
  
file_path: fairscale/fairscale/nn/pipe/balance/__init__.py
imports: from typing import List, Tuple, Union
  import torch
  from torch import Tensor
  import torch.nn
  from .None import blockpartition
  from .profile import profile_sizes, profile_times
label_desc: Use image node_id 1 for calling a global function with example usage: _balance_cost(cost, partitions) and returns: unknown