code: def build_body_blocks(
      configuration: List[Dict[str, Any]],
      main_params: Dict[str, Any],
      output_size: int,
  ) -> MultiBlocks:
      """Build encoder body blocks.
  
      Args:
          configuration: Body blocks configuration.
          main_params: Encoder main parameters.
          output_size: Architecture output size.
  
      Returns:
          MultiBlocks function encapsulation all encoder blocks.
  
      """
      fn_modules = []
      extended_conf = []
  
      for c in configuration:
          if c.get("num_blocks") is not None:
              extended_conf += c["num_blocks"] * [
                  {c_i: c[c_i] for c_i in c if c_i != "num_blocks"}
              ]
          else:
              extended_conf += [c]
  
      for i, c in enumerate(extended_conf):
          block_type = c["block_type"]
  
          if block_type == "branchformer":
              module = build_branchformer_block(c, main_params)
          elif block_type == "conformer":
              module = build_conformer_block(c, main_params)
          elif block_type == "conv1d":
              module = build_conv1d_block(
                  c, main_params["dynamic_chunk_training"]
              )
          elif block_type == "ebranchformer":
              module = build_ebranchformer_block(c, main_params)
          else:
              raise NotImplementedError
  
          fn_modules.append(module)
  
      return MultiBlocks(
          [fn() for fn in fn_modules],
          output_size,
          norm_class=main_params["after_norm_class"],
          norm_args=main_params["after_norm_args"],
          blockdrop_rate=main_params["blockdrop_rate"],
      )
  
imports: from typing import Any, Dict, List, Optional, Union
  from espnet2.asr_transducer.activation import get_activation
  from espnet2.asr_transducer.encoder.blocks.branchformer import Branchformer
  from espnet2.asr_transducer.encoder.blocks.conformer import Conformer
  from espnet2.asr_transducer.encoder.blocks.conv1d import Conv1d
  from espnet2.asr_transducer.encoder.blocks.conv_input import ConvInput
  from espnet2.asr_transducer.encoder.blocks.ebranchformer import EBranchformer
  from espnet2.asr_transducer.encoder.modules.attention import RelPositionMultiHeadedAttention
  from espnet2.asr_transducer.encoder.modules.convolution import ConformerConvolution, ConvolutionalSpatialGatingUnit, DepthwiseConvolution
  from espnet2.asr_transducer.encoder.modules.multi_blocks import MultiBlocks
  from espnet2.asr_transducer.encoder.modules.positional_encoding import RelPositionalEncoding
  from espnet2.asr_transducer.normalization import get_normalization
  from espnet.nets.pytorch_backend.transformer.positionwise_feed_forward import PositionwiseFeedForward
label_desc: Use image node_id 8 for calling a global function with example usage: build_body_blocks(configuration, main_params, output_size) and returns: MultiBlocks