code: def _make_layer(
      block,
      expansion,
      n_inputs: int,
      n_filters: int,
      n_blocks: int,
      stride: int,
      activation: str,
  ):
      return nn.Sequential(
          *[
              block(
                  expansion,
                  n_inputs if i == 0 else n_filters,
                  n_filters,
                  stride if i == 0 else 1,
                  activation=activation,
              )
              for i in range(n_blocks)
          ]
      )
  
imports: from collections import OrderedDict
  from typing import List, Union
  import torch
  from torch import nn
  from pytorch_toolbelt.modules import ACT_RELU, instantiate_activation_block, ChannelSpatialGate2d
  from pytorch_toolbelt.modules.encoders import EncoderModule, make_n_channel_input
label_desc: Use image node_id 3 for calling the XResNet obj's underlying member method code with example usage: obj._make_layer(block, expansion, n_inputs, n_filters, n_blocks, stride, activation) and returns: nn