code: def SmallResNet(
      x, test=False, act=F.relu, inplace=False, shared=False
  ):
      h = x
  
      def conv(x, maps=8, name="conv"):
          h = x
          with nn.parameter_scope(name):
              h = PF.convolution(
                  h, maps, (3, 3), (1, 1), with_bias=True
              )
              h = PF.batch_normalization(h, batch_stat=not test)
          with nn.parameter_scope("{}-shortcut".format(name)):
              s = PF.convolution(
                  h, maps, (3, 3), (1, 1), with_bias=False
              )
              h = PF.batch_normalization(h, batch_stat=not test)
          return (
              act(h + s, inplace=inplace)
              if act in (F.relu, F.leaky_relu)
              else act(h + s)
          )
  
      h = conv(h, maps=4, name="conv1")
      h = F.max_pooling(h, (2, 2))
      h = conv(h, maps=4, name="conv2")
      h = (
          conv(h, maps=8, name="conv3")
          if not shared
          else conv(h, maps=4, name="conv2")
      )
      h = F.average_pooling(h, h.shape[2:])
      h = PF.affine(h, 10)
      return h
  
imports: import sys
  import pytest
  import numpy
  import nnabla
  import nnabla.functions
  import nnabla.parametric_functions
  import nnabla.initializer
  from nnabla.ext_utils import get_extension_context
  from nbla_test_utils import list_context
  from nnabla.testing import assert_allclose
  from nnabla.function import PythonFunction
  from nnabla.backward_functions import registry, register
label_desc: Use image node_id 1 for calling a global function with example usage: SmallResNet(x, test, act, inplace, shared) and returns: h, unknown