class_docstr: Pooler layer.
  
  Pool hidden states of a specific token (for example start of the
  sequence) and add a linear transformation followed by a tanh.
  
  Arguments:
      hidden_size: hidden size
      init_method: weight initialization method for the linear layer.
          bias is set to zero.
code: def __init__(self, hidden_size, init_method, sequence_parallel=False):
      super(Pooler, self).__init__()
      self.dense = get_linear_layer(
          hidden_size, hidden_size, init_method
      )
      self.sequence_parallel = sequence_parallel
  
imports: from ast import Mod
  import torch
  from nemo.collections.nlp.modules.common.megatron.adapters.parallel_adapters import AdapterName, PromptEncoderAdapterConfig
  from nemo.collections.nlp.modules.common.megatron.layer_type import LayerType
  from nemo.collections.nlp.modules.common.megatron.module import MegatronModule
  from nemo.collections.nlp.modules.common.megatron.position_embedding import ALiBiRelativePositionEmbedding, KERPLERelativePositionEmbedding, RotaryEmbedding, SandwichRelativePositionEmbedding
  from nemo.collections.nlp.modules.common.megatron.transformer import ParallelTransformer
  from nemo.collections.nlp.modules.common.megatron.utils import ApexGuardDefaults, get_linear_layer, init_method_normal, scaled_init_method_normal
  from nemo.collections.nlp.parts import utils_funcs
  from nemo.core import adapter_mixins
label_desc: Use image node_id 1 to create a new Pooler object from inherited base classes: MegatronModule with example: obj = Pooler(hidden_size, init_method, sequence_parallel)