code: def stem(in_chs, out_chs, act_layer=nn.ReLU):
      return nn.Sequential(
          nn.Conv2D(
              in_chs, out_chs // 2, kernel_size=3, stride=2, padding=1
          ),
          nn.BatchNorm2D(out_chs // 2),
          act_layer(),
          nn.Conv2D(
              out_chs // 2, out_chs, kernel_size=3, stride=2, padding=1
          ),
          nn.BatchNorm2D(out_chs),
          act_layer(),
      )
  
imports: import math
  import itertools
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.utils import utils
  from paddleseg.cvlibs import manager, param_init
  from paddleseg.models.backbones.transformer_utils import *
label_desc: Use image node_id 1 for calling a global function with example usage: stem(in_chs, out_chs, act_layer) and returns: nn