docstr: Test builder `create_res_block` with callable inputs.
code: def test_create_res_block_with_callable(self):
      """
      Test builder `create_res_block` with callable inputs.
      """
      for norm, activation in itertools.product(
          (nn.BatchNorm3d, None),
          (nn.ReLU, nn.Softmax, nn.Sigmoid, None),
      ):
          model = create_res_block(
              dim_in=32,
              dim_inner=16,
              dim_out=64,
              bottleneck=create_bottleneck_block,
              conv_a_kernel_size=(3, 1, 1),
              conv_a_stride=(1, 1, 1),
              conv_a_padding=(1, 0, 0),
              conv_b_kernel_size=(1, 3, 3),
              conv_b_stride=(1, 2, 2),
              conv_b_padding=(0, 1, 1),
              conv_b_num_groups=1,
              conv_b_dilation=(1, 1, 1),
              norm=norm,
              norm_eps=1e-5,
              norm_momentum=0.1,
              activation_bottleneck=activation,
              activation_block=activation,
          )
          model_gt = ResBlock(
              branch1_conv=nn.Conv3d(
                  32,
                  64,
                  kernel_size=(1, 1, 1),
                  stride=(1, 2, 2),
                  bias=False,
              ),
              branch1_norm=None
              if norm is None
              else norm(num_features=64),
              branch2=BottleneckBlock(
                  conv_a=nn.Conv3d(
                      32,
                      16,
                      kernel_size=[3, 1, 1],
                      stride=[1, 1, 1],
                      padding=[1, 0, 0],
                      bias=False,
                  ),
                  norm_a=None if norm is None else norm(16),
                  act_a=None if activation is None else activation(),
                  conv_b=nn.Conv3d(
                      16,
                      16,
                      kernel_size=[1, 3, 3],
                      stride=[1, 2, 2],
                      padding=[0, 1, 1],
                      bias=False,
                  ),
                  norm_b=None if norm is None else norm(16),
                  act_b=None if activation is None else activation(),
                  conv_c=nn.Conv3d(
                      16,
                      64,
                      kernel_size=[1, 1, 1],
                      stride=[1, 1, 1],
                      padding=[0, 0, 0],
                      bias=False,
                  ),
                  norm_c=None if norm is None else norm(64),
              ),
              activation=None if activation is None else activation(),
              branch_fusion=lambda x, y: x + y,
          )
  
          model.load_state_dict(
              model_gt.state_dict(), strict=True
          )  # explicitly use strict mode.
  
          # Test forwarding.
          for input_tensor in TestBottleneckBlock._get_inputs(
              dim_in=32
          ):
              with torch.no_grad():
                  if input_tensor.shape[1] != 32:
                      with self.assertRaises(RuntimeError):
                          output_tensor = model(input_tensor)
                      continue
  
                  output_tensor = model(input_tensor)
                  output_tensor_gt = model_gt(input_tensor)
  
              self.assertEqual(
                  output_tensor.shape,
                  output_tensor_gt.shape,
                  "Output shape {} is different from expected shape {}".format(
                      output_tensor.shape, output_tensor_gt.shape
                  ),
              )
              self.assertTrue(
                  np.allclose(
                      output_tensor.numpy(), output_tensor_gt.numpy()
                  )
              )
  
imports: import itertools
  import os
  import unittest
  import numpy
  import torch
  from pytorchvideo.models.head import ResNetBasicHead
  from pytorchvideo.models.net import Net
  from pytorchvideo.models.resnet import BottleneckBlock, create_acoustic_bottleneck_block, create_acoustic_resnet, create_bottleneck_block, create_res_block, create_res_stage, create_resnet, create_resnet_with_roi_head, ResBlock, ResStage, SeparableBottleneckBlock
  from pytorchvideo.models.stem import ResNetBasicStem
  from torch import nn
label_desc: Use image node_id 3 for calling the TestResBottleneckBlock obj's underlying member method code with example usage: obj.test_create_res_block_with_callable() without return types