code: def make_layers(cfg, batch_norm=False):
      layers = []
      in_channels = 3
      for v in cfg:
          if v == "M":
              layers += [nn.MaxPool2D(kernel_size=2, stride=2)]
          else:
              conv2d = nn.Conv2D(
                  in_channels, v, kernel_size=3, padding=1
              )
              if batch_norm:
                  layers += [conv2d, nn.BatchNorm2D(v), nn.ReLU()]
              else:
                  layers += [conv2d, nn.ReLU()]
              in_channels = v
      return nn.Sequential(*layers)
  
imports: import os
  from typing import Union
  import numpy
  import paddle
  import paddle.nn
  import paddlehub.vision.transforms
  from paddlehub.module.module import moduleinfo
  from paddlehub.module.cv_module import ImageClassifierModule
  import paddle
  from paddle import nn
label_desc: Use image node_id 1 for calling a global function with example usage: make_layers(cfg, batch_norm) and returns: nn