code: def make_conv_bn_act(
      in_channels: int,
      out_channels: int,
      kernel_size: int = 3,
      stride: int = 1,
      zero_batch_norm: bool = False,
      use_activation: bool = True,
      activation: str = ACT_RELU,
  ) -> torch.nn.Sequential:
      """
      Create a nn.Conv2d block followed by nn.BatchNorm2d and (optional) activation block.
      """
      batch_norm = nn.BatchNorm2d(out_channels)
      # initializer batch normalization to 0 if its the final conv layer
      nn.init.constant_(
          batch_norm.weight, 0.0 if zero_batch_norm else 1.0
      )
      layers = [
          (
              "conv",
              nn.Conv2d(
                  in_channels,
                  out_channels,
                  kernel_size,
                  stride=stride,
                  padding=kernel_size // 2,
                  bias=False,
              ),
          ),
          ("bn", batch_norm),
      ]
      if use_activation:
          activation_block = instantiate_activation_block(
              activation, inplace=True
          )
          layers.append((activation, activation_block))
  
      return nn.Sequential(OrderedDict(layers))
  
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 1 for calling a global function with example usage: make_conv_bn_act(in_channels, out_channels, kernel_size, stride, zero_batch_norm, use_activation, activation) and returns: nn