code: def _make_layer(self, block, planes, blocks, stride=1, dilate=False):
      downsample = None
      previous_dilation = self.dilation
      if dilate:
          self.dilation *= stride
          stride = 1
      if stride != 1 or self.inplanes != planes * block.expansion:
          downsample = nn.Sequential(
              conv1x1(self.inplanes, planes * block.expansion, stride),
              nn.BatchNorm2d(
                  planes * block.expansion,
                  eps=1e-05,
              ),
          )
      layers = []
      layers.append(
          block(
              self.inplanes,
              planes,
              stride,
              downsample,
              self.groups,
              self.base_width,
              previous_dilation,
          )
      )
      self.inplanes = planes * block.expansion
      for _ in range(1, blocks):
          layers.append(
              block(
                  self.inplanes,
                  planes,
                  groups=self.groups,
                  base_width=self.base_width,
                  dilation=self.dilation,
              )
          )
  
      return nn.Sequential(*layers)
  
file_path: insightface/recognition/vpl/backbones/iresnet1024.py
imports: import torch
  from torch import nn
  from torch.utils.checkpoint import checkpoint_sequential
label_desc: Use image node_id 2 for calling the IResNet obj's underlying member method code with example usage: obj._make_layer(block, planes, blocks, stride, dilate) and returns: nn