class_docstr: ResNet based on: `Deep Residual Learning for Image Recognition <https://arxiv.org/pdf/1512.03385.pdf>`_
  and `Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet? <https://arxiv.org/pdf/1711.09577.pdf>`_.
  Adapted from `<https://github.com/kenshohara/3D-ResNets-PyTorch/tree/master/models>`_.
  
  Args:
      block: which ResNet block to use, either Basic or Bottleneck.
          ResNet block class or str.
          for Basic: ResNetBlock or 'basic'
          for Bottleneck: ResNetBottleneck or 'bottleneck'
      layers: how many layers to use.
      block_inplanes: determine the size of planes at each step. Also tunable with widen_factor.
      spatial_dims: number of spatial dimensions of the input image.
      n_input_channels: number of input channels for first convolutional layer.
      conv1_t_size: size of first convolution layer, determines kernel and padding.
      conv1_t_stride: stride of first convolution layer.
      no_max_pool: bool argument to determine if to use maxpool layer.
      shortcut_type: which downsample block to use. Options are 'A', 'B', default to 'B'.
          - 'A': using `self._downsample_basic_block`.
          - 'B': kernel_size 1 conv + norm.
      widen_factor: widen output for each layer.
      num_classes: number of output (classifications).
      feed_forward: whether to add the FC layer for the output, default to `True`.
      bias_downsample: whether to use bias term in the downsampling block when `shortcut_type` is 'B', default to `True`.
class_docstr_tok: ["ResNet","based","on",":","`","Deep","Residual","Learning","for","Image","Recognition","<","https",":","\/\/arxiv.org\/pdf\/1512.03385.pdf",">","`","_","and","`","Can","Spatiotemporal","3D","CNNs","Retrace","the","History","of","2D","CNNs","and","ImageNet","?","<","https",":","\/\/arxiv.org\/pdf\/1711.09577.pdf",">","`","_",".","Adapted","from","`","<","https",":","\/\/github.com\/kenshohara\/3D-ResNets-PyTorch\/tree\/master\/models",">","`","_",".","Args",":","block",":","which","ResNet","block","to","use",",","either","Basic","or","Bottleneck",".","ResNet","block","class","or","str",".","for","Basic",":","ResNetBlock","or","'basic'","for","Bottleneck",":","ResNetBottleneck","or","'bottleneck'","layers",":","how","many","layers","to","use",".","block_inplanes",":","determine","the","size","of","planes","at","each","step",".","Also","tunable","with","widen_factor",".","spatial_dims",":","number","of","spatial","dimensions","of","the","input","image",".","n_input_channels",":","number","of","input","channels","for","first","convolutional","layer",".","conv1_t_size",":","size","of","first","convolution","layer",",","determines","kernel","and","padding",".","conv1_t_stride",":","stride","of","first","convolution","layer",".","no_max_pool",":","bool","argument","to","determine","if","to","use","maxpool","layer",".","shortcut_type",":","which","downsample","block","to","use",".","Options","are","'","A","'",",","'","B","'",",","default","to","'","B","'",".","-","'","A","'",":","using","`","self._downsample_basic_block","`",".","-","'","B","'",":","kernel_size","1","conv","+","norm",".","widen_factor",":","widen","output","for","each","layer",".","num_classes",":","number","of","output","(","classifications",")",".","feed_forward",":","whether","to","add","the","FC","layer","for","the","output",",","default","to","`","True","`",".","bias_downsample",":","whether","to","use","bias","term","in","the","downsampling","block","when","`","shortcut_type","`","is","'","B","'",",","default","to","`","True","`","."]
code: def _make_layer(
      self,
      block: type[ResNetBlock | ResNetBottleneck],
      planes: int,
      blocks: int,
      spatial_dims: int,
      shortcut_type: str,
      stride: int = 1,
  ) -> nn.Sequential:
      conv_type: Callable = Conv[Conv.CONV, spatial_dims]
      norm_type: Callable = Norm[Norm.BATCH, spatial_dims]
  
      downsample: nn.Module | partial | None = None
      if stride != 1 or self.in_planes != planes * block.expansion:
          if look_up_option(shortcut_type, {"A", "B"}) == "A":
              downsample = partial(
                  self._downsample_basic_block,
                  planes=planes * block.expansion,
                  stride=stride,
                  spatial_dims=spatial_dims,
              )
          else:
              downsample = nn.Sequential(
                  conv_type(
                      self.in_planes,
                      planes * block.expansion,
                      kernel_size=1,
                      stride=stride,
                      bias=self.bias_downsample,
                  ),
                  norm_type(planes * block.expansion),
              )
  
      layers = [
          block(
              in_planes=self.in_planes,
              planes=planes,
              spatial_dims=spatial_dims,
              stride=stride,
              downsample=downsample,
          )
      ]
  
      self.in_planes = planes * block.expansion
      for _i in range(1, blocks):
          layers.append(
              block(self.in_planes, planes, spatial_dims=spatial_dims)
          )
  
      return nn.Sequential(*layers)
  
imports: from __future__ import annotations
  import logging
  import re
  from collections.abc import Callable
  from functools import partial
  from pathlib import Path
  from typing import Any
  import torch
  import torch.nn
  from monai.networks.layers.factories import Conv, Norm, Pool
  from monai.networks.layers.utils import get_pool_layer
  from monai.utils import ensure_tuple_rep
  from monai.utils.module import look_up_option, optional_import
label_desc: Use image node_id 3 for calling the ResNet obj's underlying member method code with example usage: obj._make_layer(block, planes, blocks, spatial_dims, shortcut_type, stride) and returns: nn