code: def module_policy(self):
      from transformers import T5EncoderModel
  
      policy = super().module_policy()
  
      if self.shard_config.enable_tensor_parallelism:
          self.append_or_create_submodule_replacement(
              description=SubModuleReplacementDescription(
                  suffix="shared",
                  target_module=VocabParallelEmbedding1D,
              ),
              policy=policy,
              target_key=T5EncoderModel,
          )
  
      if self.pipeline_stage_manager is not None:
          self.set_pipeline_forward(
              model_cls=T5EncoderModel,
              new_forward=T5PipelineForwards.t5_encoder_model_forward,
              policy=policy,
          )
      return policy
  
imports: import warnings
  from functools import partial
  from typing import Callable, Dict, List, Tuple
  import numpy
  from torch import Tensor, nn
  from colossalai.shardformer.layer import DropoutForParallelInput, Embedding1D, FusedRMSNorm, Linear1D_Col, Linear1D_Row, RMSNorm, VocabParallelEmbedding1D
  from colossalai.shardformer.policies.base_policy import ModulePolicyDescription
  from ..modeling.jit import get_jit_fused_dropout_add_func
  from ..modeling.t5 import T5PipelineForwards, get_jit_fused_T5_layer_ff_forward, get_t5_flash_attention_forward, get_T5_layer_cross_attention_forward, get_T5_layer_self_attention_forward
  from .base_policy import ModulePolicyDescription, Policy, SubModuleReplacementDescription
label_desc: Use image node_id 1 for calling the T5EncoderPolicy obj's underlying member method code with example usage: obj.module_policy() and returns: policy