code: def create_res_stage(
      *,
      # Stage configs.
      depth: int,
      # Bottleneck Block configs.
      dim_in: int,
      dim_inner: int,
      dim_out: int,
      bottleneck: Callable,
      # Conv configs.
      conv_a_kernel_size: Union[Tuple[int], List[Tuple[int]]] = (
          3,
          1,
          1,
      ),
      conv_a_stride: Tuple[int] = (2, 1, 1),
      conv_a_padding: Union[Tuple[int], List[Tuple[int]]] = (1, 0, 0),
      conv_a: Callable = nn.Conv3d,
      conv_b_kernel_size: Tuple[int] = (1, 3, 3),
      conv_b_stride: Tuple[int] = (1, 2, 2),
      conv_b_padding: Tuple[int] = (0, 1, 1),
      conv_b_num_groups: int = 1,
      conv_b_dilation: Tuple[int] = (1, 1, 1),
      conv_b: Callable = nn.Conv3d,
      conv_c: Callable = nn.Conv3d,
      # Norm configs.
      norm: Callable = nn.BatchNorm3d,
      norm_eps: float = 1e-5,
      norm_momentum: float = 0.1,
      # Activation configs.
      activation: Callable = nn.ReLU,
  ) -> nn.Module:
      """
      Create Residual Stage, which composes sequential blocks that make up a ResNet. These
      blocks could be, for example, Residual blocks, Non-Local layers, or
      Squeeze-Excitation layers.
  
      ::
  
  
                                          Input
                                             ↓
                                         ResBlock
                                             ↓
                                             .
                                             .
                                             .
                                             ↓
                                         ResBlock
  
      Normalization examples include: BatchNorm3d and None (no normalization).
      Activation examples include: ReLU, Softmax, Sigmoid, and None (no activation).
      Bottleneck examples include: create_bottleneck_block.
  
      Args:
          depth (init): number of blocks to create.
  
          dim_in (int): input channel size to the bottleneck block.
          dim_inner (int): intermediate channel size of the bottleneck.
          dim_out (int): output channel size of the bottleneck.
          bottleneck (callable): a callable that constructs bottleneck block layer.
              Examples include: create_bottleneck_block.
  
          conv_a_kernel_size (tuple or list of tuple): convolutional kernel size(s)
              for conv_a. If conv_a_kernel_size is a tuple, use it for all blocks in
              the stage. If conv_a_kernel_size is a list of tuple, the kernel sizes
              will be repeated until having same length of depth in the stage. For
              example, for conv_a_kernel_size = [(3, 1, 1), (1, 1, 1)], the kernel
              size for the first 6 blocks would be [(3, 1, 1), (1, 1, 1), (3, 1, 1),
              (1, 1, 1), (3, 1, 1)].
          conv_a_stride (tuple): convolutional stride size(s) for conv_a.
          conv_a_padding (tuple or list of tuple): convolutional padding(s) for
              conv_a. If conv_a_padding is a tuple, use it for all blocks in
              the stage. If conv_a_padding is a list of tuple, the padding sizes
              will be repeated until having same length of depth in the stage.
          conv_a (callable): a callable that constructs the conv_a conv layer, examples
              include nn.Conv3d, OctaveConv, etc
          conv_b_kernel_size (tuple): convolutional kernel size(s) for conv_b.
          conv_b_stride (tuple): convolutional stride size(s) for conv_b.
          conv_b_padding (tuple): convolutional padding(s) for conv_b.
          conv_b_num_groups (int): number of groups for groupwise convolution for
              conv_b.
          conv_b_dilation (tuple): dilation for 3D convolution for conv_b.
          conv_b (callable): a callable that constructs the conv_b conv layer, examples
              include nn.Conv3d, OctaveConv, etc
          conv_c (callable): a callable that constructs the conv_c conv layer, examples
              include nn.Conv3d, OctaveConv, etc
  
          norm (callable): a callable that constructs normalization layer. Examples
              include nn.BatchNorm3d, and None (not performing normalization).
          norm_eps (float): normalization epsilon.
          norm_momentum (float): normalization momentum.
  
          activation (callable): a callable that constructs activation layer. Examples
              include: nn.ReLU, nn.Softmax, nn.Sigmoid, and None (not performing
              activation).
  
      Returns:
          (nn.Module): resnet basic stage layer.
      """
      res_blocks = []
      if isinstance(conv_a_kernel_size[0], int):
          conv_a_kernel_size = [conv_a_kernel_size]
      if isinstance(conv_a_padding[0], int):
          conv_a_padding = [conv_a_padding]
      # Repeat conv_a kernels until having same length of depth in the stage.
      conv_a_kernel_size = (conv_a_kernel_size * depth)[:depth]
      conv_a_padding = (conv_a_padding * depth)[:depth]
  
      for ind in range(depth):
          block = create_res_block(
              dim_in=dim_in if ind == 0 else dim_out,
              dim_inner=dim_inner,
              dim_out=dim_out,
              bottleneck=bottleneck,
              conv_a_kernel_size=conv_a_kernel_size[ind],
              conv_a_stride=conv_a_stride if ind == 0 else (1, 1, 1),
              conv_a_padding=conv_a_padding[ind],
              conv_a=conv_a,
              conv_b_kernel_size=conv_b_kernel_size,
              conv_b_stride=conv_b_stride if ind == 0 else (1, 1, 1),
              conv_b_padding=conv_b_padding,
              conv_b_num_groups=conv_b_num_groups,
              conv_b_dilation=conv_b_dilation,
              conv_b=conv_b,
              conv_c=conv_c,
              norm=norm,
              norm_eps=norm_eps,
              norm_momentum=norm_momentum,
              activation_bottleneck=activation,
              activation_block=activation,
          )
          res_blocks.append(block)
      return ResStage(res_blocks=nn.ModuleList(res_blocks))
  
imports: from typing import Callable, List, Tuple, Union
  import numpy
  import torch
  import torch.nn
  from pytorchvideo.layers.utils import set_attributes
  from pytorchvideo.models.head import create_res_basic_head, create_res_roi_pooling_head
  from pytorchvideo.models.net import DetectionBBoxNetwork, Net
  from pytorchvideo.models.stem import create_acoustic_res_basic_stem, create_res_basic_stem
label_desc: Use image node_id 5 for calling a global function with example usage: create_res_stage() and returns: ResStage