code: def _make_layer(
      self, block, planes, blocks, shortcut_type, stride=1, dilation=1
  ):
      downsample = None
      if stride != 1 or self.inplanes != planes * block.expansion:
          if shortcut_type == "A":
              downsample = partial(
                  downsample_basic_block,
                  planes=planes * block.expansion,
                  stride=stride,
                  no_cuda=self.no_cuda,
              )
          else:
              downsample = nn.Sequential(
                  nn.Conv3d(
                      self.inplanes,
                      planes * block.expansion,
                      kernel_size=1,
                      stride=stride,
                      bias=False,
                  ),
                  nn.BatchNorm3d(planes * block.expansion),
              )
  
      layers = []
      layers.append(
          block(
              self.inplanes,
              planes,
              stride=stride,
              dilation=dilation,
              downsample=downsample,
          )
      )
      self.inplanes = planes * block.expansion
      for i in range(1, blocks):
          layers.append(block(self.inplanes, planes, dilation=dilation))
  
      return nn.Sequential(*layers)
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from torch.autograd import Variable
  import math
  from functools import partial
label_desc: Use image node_id 2 for calling the ResNet obj's underlying member method code with example usage: obj._make_layer(block, planes, blocks, shortcut_type, stride, dilation) and returns: nn