code: def create_2plus1d_bottleneck_block(
      *,
      # Convolution configs.
      dim_in: int,
      dim_inner: int,
      dim_out: int,
      conv_a_kernel_size: Tuple[int] = (1, 1, 1),
      conv_a_stride: Tuple[int] = (1, 1, 1),
      conv_a_padding: Tuple[int] = (0, 0, 0),
      conv_a: Callable = nn.Conv3d,
      conv_b_kernel_size: Tuple[int] = (3, 3, 3),
      conv_b_stride: Tuple[int] = (2, 2, 2),
      conv_b_padding: Tuple[int] = (1, 1, 1),
      conv_b_num_groups: int = 1,
      conv_b_dilation: Tuple[int] = (1, 1, 1),
      conv_b: Callable = create_conv_2plus1d,
      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:
      """
      2plus1d bottleneck block: a sequence of spatiotemporal Convolution, Normalization,
      and Activations repeated in the following order:
  
      ::
  
                                      Conv3d (conv_a)
                                             ↓
                                   Normalization (norm_a)
                                             ↓
                                     Activation (act_a)
                                             ↓
                                    Conv(2+1)d (conv_b)
                                             ↓
                                   Normalization (norm_b)
                                             ↓
                                     Activation (act_b)
                                             ↓
                                      Conv3d (conv_c)
                                             ↓
                                   Normalization (norm_c)
  
      Normalization examples include: BatchNorm3d and None (no normalization).
      Activation examples include: ReLU, Softmax, Sigmoid, and None (no activation).
  
      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.
          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
  
          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 (callable): a callable that constructs activation layer, examples
              include: nn.ReLU, nn.Softmax, nn.Sigmoid, and None (not performing
              activation).
  
      Returns:
          (nn.Module): 2plus1d bottleneck block.
      """
      return create_bottleneck_block(
          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=partial(
              create_conv_2plus1d,
              norm=norm,
              norm_eps=norm_eps,
              norm_momentum=norm_momentum,
              activation=activation,
          ),
          conv_c=conv_c,
          norm=norm,
          norm_eps=norm_eps,
          norm_momentum=norm_momentum,
          activation=activation,
      )
  
file_path: pytorchvideo/pytorchvideo/models/r2plus1d.py
imports: from functools import partial
  from typing import Callable, Tuple
  import torch
  import torch.nn
  from pytorchvideo.layers.convolutions import create_conv_2plus1d
  from pytorchvideo.models.head import create_res_basic_head
  from pytorchvideo.models.net import Net
  from pytorchvideo.models.resnet import create_bottleneck_block, create_res_stage
  from pytorchvideo.models.stem import create_res_basic_stem
label_desc: Use image node_id 1 for calling a global function with example usage: create_2plus1d_bottleneck_block() and returns: create_bottleneck_block