class_docstr: Stats for a sharding planner execution.
class_docstr_tok: ["Stats","for","a","sharding","planner","execution","."]
code: def _log_imbalance_tables(
      self, best_plan: List[ShardingOption]
  ) -> None:
      self._stats_table.append(f"#{'' : ^{self._width-2}}#")
      perf_imbalance_tables = _find_imbalance_tables(best_plan)
      hbm_imbalance_tables = _find_imbalance_tables(
          best_plan, target_imbalance="hbm"
      )
      self._stats_table.append(
          f"# {'Top 5 Tables Causing Max Perf:' : <{self._width-3}}#"
      )
      for sharding_option in perf_imbalance_tables[0:5]:
          self._stats_table.append(
              f"#    {sharding_option.name : <{self._width-6}}#"
          )
      self._stats_table.append(
          f"# {'Top 5 Tables Causing Max HBM:' : <{self._width-3}}#"
      )
      for sharding_option in hbm_imbalance_tables[0:5]:
          self._stats_table.append(
              f"#    {sharding_option.name : <{self._width-6}}#"
          )
  
imports: import logging
  from collections import defaultdict
  from typing import Any, cast, Dict, List, Optional, Tuple, Union
  from torch import nn
  from torchrec.distributed.planner.constants import BIGINT_DTYPE, NUM_POOLINGS
  from torchrec.distributed.planner.shard_estimators import _calculate_shard_io_sizes
  from torchrec.distributed.planner.storage_reservations import FixedPercentageStorageReservation, HeuristicalStorageReservation, InferenceStorageReservation
  from torchrec.distributed.planner.types import ParameterConstraints, Perf, ShardingOption, Stats, Storage, StorageReservation, Topology
  from torchrec.distributed.planner.utils import _find_imbalance_tables, bytes_to_gb, bytes_to_mb, sharder_name
  from torchrec.distributed.types import ModuleSharder, ParameterSharding, ShardingPlan, ShardingType
label_desc: Use image node_id 6 for calling the EmbeddingStats obj's underlying member method code with example usage: obj._log_imbalance_tables(best_plan) without return types