code: def verify_block_arguments(
      net_part: str,
      block: Dict[str, Any],
      num_block: int,
  ) -> Tuple[int, int]:
      """Verify block arguments are valid.
  
      Args:
          net_part: Network part, either 'encoder' or 'decoder'.
          block: Block parameters.
          num_block: Block ID.
  
      Return:
          block_io: Input and output dimension of the block.
  
      """
      block_type = block.get("type")
  
      if block_type is None:
          raise ValueError(
              "Block %d in %s doesn't a type assigned.",
              (num_block, net_part),
          )
  
      if block_type == "transformer":
          arguments = {"d_hidden", "d_ff", "heads"}
      elif block_type == "conformer":
          arguments = {
              "d_hidden",
              "d_ff",
              "heads",
              "macaron_style",
              "use_conv_mod",
          }
  
          if net_part == "decoder":
              raise ValueError("Decoder does not support 'conformer'.")
  
          if (
              block.get("use_conv_mod", None) is True
              and "conv_mod_kernel" not in block
          ):
              raise ValueError(
                  "Block %d: 'use_conv_mod' is True but "
                  " 'conv_mod_kernel' is not specified" % num_block
              )
      elif block_type == "causal-conv1d":
          arguments = {"idim", "odim", "kernel_size"}
  
          if net_part == "encoder":
              raise ValueError(
                  "Encoder does not support 'causal-conv1d'."
              )
  
      elif block_type == "conv1d":
          arguments = {"idim", "odim", "kernel_size"}
  
          if net_part == "decoder":
              raise ValueError("Decoder does not support 'conv1d.'")
      else:
          raise NotImplementedError(
              "Wrong type. Currently supported: "
              "causal-conv1d, conformer, conv-nd or transformer."
          )
  
      if not arguments.issubset(block):
          raise ValueError(
              "%s in %s in position %d: Expected block arguments : %s."
              " See tutorial page for more information."
              % (block_type, net_part, num_block, arguments)
          )
  
      if block_type in ("transformer", "conformer"):
          block_io = (block["d_hidden"], block["d_hidden"])
      else:
          block_io = (block["idim"], block["odim"])
  
      return block_io
  
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 1 for calling a global function with example usage: verify_block_arguments(net_part, block, num_block) and returns: block_io