code: def balance_load(self, optim: LowLevelZeroOptimizer) -> None:
      # prepare load
      load = self._sync_load()
      load = self._load_to_list(load)
      # search balance
      swap_list = self._search_balance(load)
      if dist.get_rank() == 0:
          if len(swap_list) > 0:
              print(f"[Load Balance] Applying expert swap...")
          else:
              print(f"[Load Balance] Invalid swap, skip...")
      # swap expert and gate
      self._swap_moe_param(swap_list, optim)
      # clear load
      self._clear_load()
  
imports: from copy import deepcopy
  from typing import List, Optional, Tuple
  import torch
  import torch.distributed
  from torch import Tensor, nn
  from torch.distributed import ProcessGroup
  from colossalai.cluster import ProcessGroupMesh
  from colossalai.moe.experts import MLPExperts
  from colossalai.moe.manager import MOE_MANAGER
  from colossalai.zero.low_level import LowLevelZeroOptimizer
label_desc: Use image node_id 17 for calling the LoadBalancer obj's underlying member method code with example usage: obj.balance_load(optim) without return types