code: def test_pf_min_max_quantized_affine_execution(
      g_rng,
      inshape,
      n_outmaps,
      base_axis,
      w_init,
      b_init,
      with_bias,
      fix_parameters,
      quantize_w,
      ql_min_w,
      ql_max_w,
      w_min_max,
      ste_fine_grained_w,
      quantize_b,
      ql_min_b,
      ql_max_b,
      b_min_max,
      ste_fine_grained_b,
      rng,
  ):
      w_shape = (int(np.prod(inshape[base_axis:])), n_outmaps)
      b_shape = (n_outmaps,)
      w_init = process_param_init(w_init, w_shape, g_rng)
      b_init = process_param_init(b_init, b_shape, g_rng)
      rng = process_rng(rng)
  
      kw = {}
      insert_if_not_none(kw, "w_init", w_init)
      insert_if_not_none(kw, "b_init", b_init)
      insert_if_not_none(kw, "rng", rng)
      insert_if_not_default(kw, "base_axis", base_axis, 1)
      insert_if_not_default(kw, "fix_parameters", fix_parameters, False)
      insert_if_not_default(kw, "with_bias", with_bias, True)
      insert_if_not_default(kw, "quantize_w", quantize_w, True)
      insert_if_not_default(kw, "ql_min_w", ql_min_w, True)
      insert_if_not_default(kw, "ql_max_w", ql_max_w, True)
      insert_if_not_default(kw, "w_min_max", w_min_max, False)
      insert_if_not_default(
          kw, "ste_fine_grained_w", ste_fine_grained_w, True
      )
      insert_if_not_default(kw, "quantize_b", quantize_b, True)
      insert_if_not_default(kw, "ql_min_b", ql_min_b, True)
      insert_if_not_default(kw, "ql_max_b", ql_max_b, True)
      insert_if_not_default(kw, "b_min_max", b_min_max, False)
      insert_if_not_default(
          kw, "ste_fine_grained_b", ste_fine_grained_b, True
      )
  
      x = nn.Variable.from_numpy_array(g_rng.randn(*inshape))
  
      # Check execution
      y = PF.min_max_quantized_affine(x, n_outmaps, **kw)
      y.forward()
      y.backward()
  
      # Check values
      # TODO
  
      # Check args
      assert y.parent.info.type_name == "Affine"
      args = y.parent.info.args
      assert args["base_axis"] == base_axis
      args_qw = y.parent.inputs[1].parent.info.args
      assert args_qw["x_min_max"] == w_min_max
      if len(y.parent.inputs) == 3:
          args_qb = y.parent.inputs[2].parent.info.args
          assert args_qb["x_min_max"] == b_min_max
  
      # Check created parameters
      assert y.parent.inputs[0] == x
      assert len(y.parent.inputs) == 2 + int(with_bias)
      assert (
          len(nn.get_parameters()) == 3 + 3 * int(with_bias)
          if w_min_max or b_min_max
          else 1 + int(with_bias)
      )
      w = nn.get_parameters()["min_max_quantized_affine/W"]
      assert w.shape == w_shape
      assert w.need_grad
      assert y.parent.inputs[1].need_grad == (not fix_parameters)
      if isinstance(w_init, np.ndarray):
          assert np.allclose(w_init, w.d)
      if with_bias:
          b = nn.get_parameters()["min_max_quantized_affine/b"]
          assert b.shape == b_shape
          assert b.need_grad
          assert y.parent.inputs[2].need_grad == (not fix_parameters)
          if isinstance(b_init, np.ndarray):
              assert np.allclose(b_init, b.d)
      # quantization-related parameters
      assert (
          len(nn.get_parameters(grad_only=False))
          == 6 + int(with_bias) * 6
      )
      for k in nn.get_parameters(grad_only=False).keys():
          assert k in [
              "min_max_quantized_affine/W",
              "min_max_quantized_affine/W_q",
              "min_max_quantized_affine/min_max_quantize_w/min_max_quantize/qr_min",
              "min_max_quantized_affine/min_max_quantize_w/min_max_quantize/qr_max",
              "min_max_quantized_affine/min_max_quantize_w/min_max_quantize/ql_min",
              "min_max_quantized_affine/min_max_quantize_w/min_max_quantize/ql_max",
              "min_max_quantized_affine/b",
              "min_max_quantized_affine/b_q",
              "min_max_quantized_affine/min_max_quantize_b/min_max_quantize/qr_min",
              "min_max_quantized_affine/min_max_quantize_b/min_max_quantize/qr_max",
              "min_max_quantized_affine/min_max_quantize_b/min_max_quantize/ql_min",
              "min_max_quantized_affine/min_max_quantize_b/min_max_quantize/ql_max",
          ]
  
imports: import pytest
  import numpy
  import nnabla
  import nnabla.functions
  import nnabla.parametric_functions
  import nnabla.initializer
  from nnabla.testing import assert_allclose
  from nbla_test_utils import list_context
label_desc: Use image node_id 25 for calling a global function with example usage: test_pf_min_max_quantized_affine_execution(g_rng, inshape, n_outmaps, base_axis, w_init, b_init, with_bias, fix_parameters, quantize_w, ql_min_w, ql_max_w, w_min_max, ste_fine_grained_w, quantize_b, ql_min_b, ql_max_b, b_min_max, ste_fine_grained_b, rng) without return types