code: def create_res_block(
      *,
      # Bottleneck Block configs.
      dim_in: int,
      dim_inner: int,
      dim_out: int,
      bottleneck: Callable,
      use_shortcut: bool = False,
      branch_fusion: Callable = _trivial_sum,
      # Conv configs.
      conv_a_kernel_size: Tuple[int] = (3, 1, 1),
      conv_a_stride: Tuple[int] = (2, 1, 1),
      conv_a_padding: 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,
      conv_skip: Callable = nn.Conv3d,
      # Norm configs.
      norm: Callable = nn.BatchNorm3d,
      norm_eps: float = 1e-5,
      norm_momentum: float = 0.1,
      # Activation configs.
      activation_bottleneck: Callable = nn.ReLU,
      activation_block: Callable = nn.ReLU,
  ) -> nn.Module:
      """
      Residual block. Performs a summation between an identity shortcut in branch1 and a
      main block in branch2. When the input and output dimensions are different, a
      convolution followed by a normalization will be performed.
  
      ::
  
  
                                           Input
                                             |-------+
                                             ↓       |
                                           Block     |
                                             ↓       |
                                         Summation ←-+
                                             ↓
                                         Activation
  
      Normalization examples include: BatchNorm3d and None (no normalization).
      Activation examples include: ReLU, Softmax, Sigmoid, and None (no activation).
      Transform examples include: BottleneckBlock.
  
      Args:
          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.
          use_shortcut (bool): If true, use conv and norm layers in skip connection.
          branch_fusion (callable): a callable that constructs summation layer.
              Examples include: lambda x, y: x + y, OctaveSum.
  
          conv_a_kernel_size (tuple): convolutional kernel size(s) for conv_a.
          conv_a_stride (tuple): convolutional stride size(s) for conv_a.
          conv_a_padding (tuple): convolutional padding(s) for conv_a.
          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
          conv_skip (callable): a callable that constructs the conv_skip conv layer,
          examples include nn.Conv3d, OctaveConv, etc
  
          norm (callable): a callable that constructs normalization layer. Examples
              include nn.BatchNorm3d, None (not performing normalization).
          norm_eps (float): normalization epsilon.
          norm_momentum (float): normalization momentum.
  
          activation_bottleneck (callable): a callable that constructs activation layer in
              bottleneck. Examples include: nn.ReLU, nn.Softmax, nn.Sigmoid, and None
              (not performing activation).
          activation_block (callable): a callable that constructs activation layer used
              at the end of the block. Examples include: nn.ReLU, nn.Softmax, nn.Sigmoid,
              and None (not performing activation).
  
      Returns:
          (nn.Module): resnet basic block layer.
      """
      branch1_conv_stride = tuple(
          [x * y for x, y in zip(conv_a_stride, conv_b_stride)]
      )
      norm_model = None
      if use_shortcut or (
          norm is not None
          and (dim_in != dim_out or np.prod(branch1_conv_stride) != 1)
      ):
          norm_model = norm(
              num_features=dim_out, eps=norm_eps, momentum=norm_momentum
          )
  
      return ResBlock(
          branch1_conv=conv_skip(
              dim_in,
              dim_out,
              kernel_size=(1, 1, 1),
              stride=branch1_conv_stride,
              bias=False,
          )
          if (dim_in != dim_out or np.prod(branch1_conv_stride) != 1)
          or use_shortcut
          else None,
          branch1_norm=norm_model,
          branch2=bottleneck(
              dim_in=dim_in,
              dim_inner=dim_inner,
              dim_out=dim_out,
              conv_a_kernel_size=conv_a_kernel_size,
              conv_a_stride=conv_a_stride,
              conv_a_padding=conv_a_padding,
              conv_a=conv_a,
              conv_b_kernel_size=conv_b_kernel_size,
              conv_b_stride=conv_b_stride,
              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=activation_bottleneck,
          ),
          activation=None
          if activation_block is None
          else activation_block(),
          branch_fusion=branch_fusion,
      )
  
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 4 for calling a global function with example usage: create_res_block() and returns: ResBlock