code: def create_conv_2plus1d(
      *,
      # Conv configs.
      in_channels: int,
      out_channels: int,
      inner_channels: int = None,
      conv_xy_first: bool = False,
      kernel_size: Tuple[int] = (3, 3, 3),
      stride: Tuple[int] = (2, 2, 2),
      padding: Tuple[int] = (1, 1, 1),
      bias: bool = False,
      dilation: Tuple[int] = (1, 1, 1),
      groups: int = 1,
      # BN configs.
      norm: Callable = nn.BatchNorm3d,
      norm_eps: float = 1e-5,
      norm_momentum: float = 0.1,
      # Activation configs.
      activation: Callable = nn.ReLU,
  ) -> nn.Module:
      """
      Create a 2plus1d conv layer. It performs spatiotemporal Convolution, BN, and
      Relu following by a spatiotemporal pooling.
  
      ::
  
                          Conv_t (or Conv_xy if conv_xy_first = True)
                                             ↓
                                       Normalization
                                             ↓
                                         Activation
                                             ↓
                          Conv_xy (or Conv_t if conv_xy_first = True)
  
      Normalization options include: BatchNorm3d and None (no normalization).
      Activation options include: ReLU, Softmax, Sigmoid, and None (no activation).
  
      Args:
          in_channels (int): input channel size of the convolution.
          out_channels (int): output channel size of the convolution.
          kernel_size (tuple): convolutional kernel size(s).
          stride (tuple): convolutional stride size(s).
          padding (tuple): convolutional padding size(s).
          bias (bool): convolutional bias. If true, adds a learnable bias to the
              output.
          groups (int): Number of groups in convolution layers. value >1 is unsupported.
          dilation (tuple): dilation value in convolution layers. value >1 is unsupported.
          conv_xy_first (bool): If True, spatial convolution comes before temporal conv
  
          norm (callable): a callable that constructs normalization layer, options
              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, options
              include: nn.ReLU, nn.Softmax, nn.Sigmoid, and None (not performing
              activation).
  
      Returns:
          (nn.Module): 2plus1d conv layer.
      """
      if inner_channels is None:
          inner_channels = out_channels
  
      assert (
          groups == 1
      ), "Support for groups is not implemented in R2+1 convolution layer"
      assert (
          max(dilation) == 1 and min(dilation) == 1
      ), "Support for dillaiton is not implemented in R2+1 convolution layer"
  
      conv_t_module = nn.Conv3d(
          in_channels=in_channels
          if not conv_xy_first
          else inner_channels,
          out_channels=inner_channels
          if not conv_xy_first
          else out_channels,
          kernel_size=(kernel_size[0], 1, 1),
          stride=(stride[0], 1, 1),
          padding=(padding[0], 0, 0),
          bias=bias,
      )
      norm_module = (
          None
          if norm is None
          else norm(
              num_features=inner_channels,
              eps=norm_eps,
              momentum=norm_momentum,
          )
      )
      activation_module = None if activation is None else activation()
      conv_xy_module = nn.Conv3d(
          in_channels=inner_channels
          if not conv_xy_first
          else in_channels,
          out_channels=out_channels
          if not conv_xy_first
          else inner_channels,
          kernel_size=(1, kernel_size[1], kernel_size[2]),
          stride=(1, stride[1], stride[2]),
          padding=(0, padding[1], padding[2]),
          bias=bias,
      )
  
      return Conv2plus1d(
          conv_t=conv_t_module,
          norm=norm_module,
          activation=activation_module,
          conv_xy=conv_xy_module,
          conv_xy_first=conv_xy_first,
      )
  
file_path: pytorchvideo/pytorchvideo/layers/convolutions.py
imports: from typing import Callable, Optional, Tuple
  import torch
  import torch.nn
  from pytorchvideo.layers.utils import set_attributes
  from torch.nn.common_types import _size_3_t
label_desc: Use image node_id 1 for calling a global function with example usage: create_conv_2plus1d() and returns: Conv2plus1d