class_docstr: Testing hierarchical sharding types.
  
  NOTE:
      Requires at least 4 GPUs to test.
class_docstr_tok: ["Testing","hierarchical","sharding","types",".","NOTE",":","Requires","at","least","4","GPUs","to","test","."]
code: def test_seq_emb_tower_nccl(
      self,
      sharding_type: str,
      kernel_type: str,
      apply_optimizer_in_backward_config: Optional[
          Dict[str, Tuple[Type[torch.optim.Optimizer], Dict[str, Any]]]
      ],
  ) -> None:
      self._test_sharding(
          # pyre-ignore [6]
          sharders=[
              create_test_sharder(
                  SharderType.EMBEDDING_TOWER.value,
                  sharding_type,
                  kernel_type,
              )
          ],
          backend="nccl",
          world_size=4,
          local_size=2,
          model_class=TestSequenceTowerSparseNN,
          apply_optimizer_in_backward_config=apply_optimizer_in_backward_config,
      )
  
file_path: torchrec/torchrec/distributed/tests/test_sequence_model_parallel_hierarchical.py
imports: import unittest
  from typing import Any, Dict, List, Optional, Tuple, Type
  import torch
  from fbgemm_gpu.split_embedding_configs import EmbOptimType
  from hypothesis import given, settings, strategies, Verbosity
  from torchrec.distributed.embedding_types import EmbeddingComputeKernel
  from torchrec.distributed.test_utils.multi_process import MultiProcessTestBase
  from torchrec.distributed.test_utils.test_model import TestSparseNNBase
  from torchrec.distributed.test_utils.test_sharding import create_test_sharder, SharderType, sharding_single_rank_test
  from torchrec.distributed.tests.test_sequence_model import TestEmbeddingCollectionSharder, TestSequenceSparseNN, TestSequenceTowerSparseNN
  from torchrec.distributed.types import ShardingType
  from torchrec.modules.embedding_configs import EmbeddingConfig
  from torchrec.test_utils import seed_and_log, skip_if_asan_class
label_desc: Use image node_id 1 for calling the SequenceModelParallelHierarchicalTest obj's underlying member method code with example usage: obj.test_seq_emb_tower_nccl(sharding_type, kernel_type, apply_optimizer_in_backward_config) without return types