code: def setUp(self) -> None:
      compute_device = "cuda"
      self.topology = Topology(
          world_size=2,
          hbm_cap=1024 * 1024 * 2,
          compute_device=compute_device,
      )
      self.constraints = {
          "table_0": ParameterConstraints(
              enforce_hbm=True,
              cache_params=CacheParams(
                  algorithm=CacheAlgorithm.LFU,
              ),
          ),
          "table_1": ParameterConstraints(
              enforce_hbm=False,
              stochastic_rounding=True,
          ),
          "table_2": ParameterConstraints(
              bounds_check_mode=BoundsCheckMode.FATAL
          ),
          "table_3": ParameterConstraints(
              cache_params=CacheParams(
                  algorithm=CacheAlgorithm.LFU,
                  load_factor=0.1,
                  reserved_memory=1.0,
                  precision=DataType.FP16,
              ),
          ),
      }
      self.planner = EmbeddingShardingPlanner(
          topology=self.topology, constraints=self.constraints
      )
  
imports: import unittest
  from typing import cast, List
  import torch
  from torch import nn
  from torchrec.distributed.embedding_types import EmbeddingComputeKernel
  from torchrec.distributed.embeddingbag import EmbeddingBagCollectionSharder
  from torchrec.distributed.planner import ParameterConstraints
  from torchrec.distributed.planner.planners import EmbeddingShardingPlanner
  from torchrec.distributed.planner.types import PlannerError, PlannerErrorType, Topology
  from torchrec.distributed.sharding_plan import get_default_sharders
  from torchrec.distributed.test_utils.test_model import TestSparseNN
  from torchrec.distributed.types import BoundsCheckMode, CacheAlgorithm, CacheParams, DataType, EmbeddingModuleShardingPlan, ModuleSharder, ShardingPlan, ShardingType
  from torchrec.modules.embedding_configs import EmbeddingBagConfig
label_desc: Use image node_id 1 for calling the TestEmbeddingShardingPlannerWithConstraints obj's underlying member method code with example usage: obj.setUp() without return types