code: def load(
      self,
      search_space: List[ShardingOption],
      enumerator: Optional[Enumerator] = None,
  ) -> None:
      self._reset()
      for sharding_option in search_space:
          fqn = sharding_option.fqn
          if fqn not in self._sharding_options_by_fqn:
              self._sharding_options_by_fqn[fqn] = []
          self._sharding_options_by_fqn[fqn].append(sharding_option)
  
      for sharding_options in self._sharding_options_by_fqn.values():
          sharding_options.sort(key=lambda x: _sharding_option_score(x))
  
      total_proposals = prod(
          [
              len(sharding_options)
              for sharding_options in self._sharding_options_by_fqn.values()
          ]
      )
      if total_proposals > self._max_proposals:
          total_proposals = (
              "{:.2e}".format(Decimal(total_proposals))
              if total_proposals > 1e6
              else total_proposals
          )
          logger.info(
              "Skipping grid search proposer as there are too many proposals.\n"
              f"Total proposals to search: {total_proposals}\n"
              f"Max proposals allowed: {self._max_proposals}\n"
          )
          return
      sharding_options_by_fqn_indices = [
          range(len(sharding_options))
          for sharding_options in self._sharding_options_by_fqn.values()
      ]
      # pyre-fixme[8]: Attribute has type `List[List[int]]`; used as
      #  `List[Tuple[int]]`.
      self._proposals = list(
          itertools.product(*sharding_options_by_fqn_indices)
      )
  
imports: import copy
  import itertools
  import logging
  from decimal import Decimal
  from typing import cast, Dict, List, Optional, Set, Tuple, Union
  import torch
  from torchrec.distributed.embedding_types import EmbeddingComputeKernel
  from torchrec.distributed.planner.types import Enumerator, Perf, Proposer, ShardingOption, Topology
  from torchrec.distributed.planner.utils import BinarySearchPredicate, bytes_to_gb, prod
label_desc: Use image node_id 2 for calling the GridSearchProposer obj's underlying member method code with example usage: obj.load(search_space, enumerator) without return types