code: def prepare_body_model(
      net_part: str,
      blocks: List[Dict[str, Any]],
  ) -> Tuple[int]:
      """Prepare model body blocks.
  
      Args:
          net_part: Network part, either 'encoder' or 'decoder'.
          blocks: Blocks parameters for network part.
  
      Return:
          : Network output dimension.
  
      """
      cmp_io = [
          verify_block_arguments(net_part, b, (i + 1))
          for i, b in enumerate(blocks)
      ]
  
      if {"transformer", "conformer"} <= {b["type"] for b in blocks}:
          raise NotImplementedError(
              net_part + ": transformer and conformer blocks "
              "can't be used together in the same net part."
          )
  
      for i in range(1, len(cmp_io)):
          if cmp_io[(i - 1)][1] != cmp_io[i][0]:
              raise ValueError(
                  "Output/Input mismatch between blocks %d and %d in %s"
                  % (i, (i + 1), net_part)
              )
  
      return cmp_io[-1][1]
  
imports: from typing import Any, Dict, List, Tuple, Union
  import torch
  from espnet.nets.pytorch_backend.conformer.convolution import ConvolutionModule
  from espnet.nets.pytorch_backend.conformer.encoder_layer import EncoderLayer
  from espnet.nets.pytorch_backend.nets_utils import get_activation
  from espnet.nets.pytorch_backend.transducer.conv1d_nets import CausalConv1d, Conv1d
  from espnet.nets.pytorch_backend.transducer.transformer_decoder_layer import TransformerDecoderLayer
  from espnet.nets.pytorch_backend.transducer.vgg2l import VGG2L
  from espnet.nets.pytorch_backend.transformer.attention import MultiHeadedAttention, RelPositionMultiHeadedAttention
  from espnet.nets.pytorch_backend.transformer.embedding import PositionalEncoding, RelPositionalEncoding, ScaledPositionalEncoding
  from espnet.nets.pytorch_backend.transformer.encoder_layer import EncoderLayer
  from espnet.nets.pytorch_backend.transformer.positionwise_feed_forward import PositionwiseFeedForward
  from espnet.nets.pytorch_backend.transformer.repeat import MultiSequential
  from espnet.nets.pytorch_backend.transformer.subsampling import Conv2dSubsampling
label_desc: Use image node_id 3 for calling a global function with example usage: prepare_body_model(net_part, blocks) and returns: cmp_io