code: def recording_to_training_resblock(
      x,
      cfg,
      maps,
      sx,
      zpx,
      kernel=(3, 3),
      pad=(1, 1),
      stride=(1, 1),
      test=False,
      channel_last=False,
      name="convblock",
  ):
      axes = get_channel_axes(x, channel_last)
      rm = cfg.round_mode
      nr = cfg.narrow_range
      dt = cfg.dtype
      sw, zpw, sb, zpb = None, None, None, None
      get_scale_zeropoint = cfg.recorder_activation.get_scale_zeropoint
  
      h = x
      h1 = h
      with nn.parameter_scope(name):
          h1 = F.dequantize_linear(h, sx, zpx)
  
      with nn.parameter_scope("{}-conv".format(name)):
          # Q->x->D
          h = h1
          w, b = create_conv_weight_bias(
              h, 16, kernel=kernel, channel_last=channel_last, name=name
          )
  
          # Q->w->D
          sw, zpw = get_scale_zeropoint(
              w, axes=axes, narrow_range=nr, name="sw"
          )
          if sw is None:
              shape = [1] * w.ndim
              name = "{}-conv".format(name) + "/" + "sw"
              sw, zpw = get_fake_quantization_parameter(shape, name)
          w = F.quantize_linear(w, sw, zpw, rm, nr, dt)
          w = F.dequantize_linear(w, sw, zpw)
  
          # Q->b->D
          sb = sx.reshape([1]) * sw.reshape([1])
          sb = nn.Variable.from_numpy_array(sb.d)
          zpb = zpx.reshape([1])
          zpb = nn.Variable.from_numpy_array(zpb.d)
          b = F.quantize_linear(b, sb, zpb, rm, nr, dt)
          b = F.dequantize_linear(b, sb, zpb)
  
          # D->F->Q
          h = F.convolution(
              h, w, b, pad=pad, stride=stride, channel_last=channel_last
          )
          sx, zpx = get_scale_zeropoint(
              h, axes=axes, narrow_range=nr, name="s"
          )
          if sx is None:
              shape = [1] * h.ndim
              name = "{}-conv".format(name) + "/" + "s"
              sx, zpx = get_fake_quantization_parameter(shape, name)
          h = F.quantize_linear(h, sx, zpx, rm, nr, dt)
  
      with nn.parameter_scope("{}-Add2".format(name)):
          # Q->x->D
          h = F.dequantize_linear(h, sx, zpx)
          h = h1 + h
          # D->F->Q
          sx, zpx = get_scale_zeropoint(
              h, axes=axes, narrow_range=nr, name="s"
          )
          if sx is None:
              shape = [1] * h.ndim
              name = "{}-Add2".format(name) + "/" + "s"
              sx, zpx = get_fake_quantization_parameter(shape, name)
          h = F.quantize_linear(h, sx, zpx, rm, nr, dt)
  
      with nn.parameter_scope("{}-ReLU".format(name)):
          # D->F->Q
          h = F.dequantize_linear(h, sx, zpx)
          h = F.relu(h)
          sx, zpx = get_scale_zeropoint(
              h, axes=axes, narrow_range=nr, name="s"
          )
          if sx is None:
              shape = [1] * h.ndim
              name = "{}-ReLU".format(name) + "/" + "s"
              sx, zpx = get_fake_quantization_parameter(shape, name)
          h = F.quantize_linear(h, sx, zpx, rm, nr, dt)
  
      return h, sx, zpx
  
imports: from __future__ import absolute_import
  import nnabla
  import nnabla.functions
  import nnabla.parametric_functions
  from .helper import create_scale_bias, create_conv_weight_bias, create_affine_weight_bias, get_channel_axes
label_desc: Use image node_id 40 for calling a global function with example usage: recording_to_training_resblock(x, cfg, maps, sx, zpx, kernel, pad, stride, test, channel_last, name) and returns: h,  sx,  zpx