code: def validate_input_block(
      configuration: Dict[str, Any],
      body_first_conf: Dict[str, Any],
      input_size: int,
  ) -> int:
      """Validate input block.
  
      Args:
          configuration: Encoder input block configuration.
          body_first_conf: Encoder first body block configuration.
          input_size: Encoder input block input size.
  
      Return:
          output_size: Encoder input block output size.
  
      """
      vgg_like = configuration.get("vgg_like", False)
      next_block_type = body_first_conf.get("block_type")
      allowed_next_block_type = [
          "branchformer",
          "conformer",
          "conv1d",
          "ebranchformer",
      ]
  
      if next_block_type is None or (
          next_block_type not in allowed_next_block_type
      ):
          return -1
  
      if configuration.get("subsampling_factor") is None:
          configuration["subsampling_factor"] = 4
      sub_factor = configuration["subsampling_factor"]
  
      if vgg_like:
          conv_size = configuration.get("conv_size", (64, 128))
  
          if isinstance(conv_size, int):
              conv_size = (conv_size, conv_size)
  
          if sub_factor not in [4, 6]:
              raise ValueError(
                  "VGG2L input module only support subsampling factor of 4 and 6."
              )
      else:
          conv_size = configuration.get("conv_size", None)
  
          if isinstance(conv_size, tuple):
              conv_size = conv_size[0]
  
          if sub_factor not in [2, 4, 6]:
              raise ValueError(
                  "Conv2D input module only support subsampling factor of 2, 4 and 6."
              )
  
      if next_block_type == "conv1d":
          if vgg_like:
              _, output_size = get_convinput_module_parameters(
                  input_size, conv_size[1], sub_factor, is_vgg=True
              )
          else:
              if conv_size is None:
                  conv_size = body_first_conf.get("output_size", 64)
  
              _, output_size = get_convinput_module_parameters(
                  input_size, conv_size, sub_factor, is_vgg=False
              )
  
          configuration["output_size"] = None
      else:
          output_size = body_first_conf.get("hidden_size")
  
          if conv_size is None:
              conv_size = output_size
  
          configuration["output_size"] = output_size
  
      configuration["conv_size"] = conv_size
      configuration["vgg_like"] = vgg_like
  
      return output_size
  
imports: from typing import Any, Dict, List, Tuple
  from espnet2.asr_transducer.utils import get_convinput_module_parameters
label_desc: Use image node_id 2 for calling a global function with example usage: validate_input_block(configuration, body_first_conf, input_size) and returns: output_size, unknown