code: def add_recorder(self, f, inputs, cfg):
      fn = f.info.type_name
      function_rank = self.get_function_rank(f)
      scope = "{}-{}".format(fn, function_rank)
      axes = [3] if cfg.channel_last else [1]
      recorder_activation = cfg.recorder_activation
      recorder_weight = cfg.recorder_weight
  
      params_idx = 1
      if fn in ["Concatenate", "Stack"]:
          params_idx = len(inputs)
      if fn in self._fct_bin_set:
          params_idx = 2
  
      new_inputs = []
      # Add recorder for variable(activation)
      for i, input_var in enumerate(inputs[:params_idx]):
          fref = input_var.function_references
          if (
              fref
              and fref[0].info.type_name
              == cfg.recorder_activation().name()
          ):
              input_var = fref[0].outputs[0]
          else:
              with nn.parameter_scope(scope):
                  parent = input_var.parent
                  if (
                      parent
                      and parent.info.type_name
                      == recorder_activation().name()
                  ):
                      input_var = input_var
                  else:
                      input_var = recorder_activation()(
                          input_var,
                          axes=axes,
                          training=self._training,
                          name="x{}".format(i),
                      )
          new_inputs.append(input_var)
  
      # Add recorder for parameters(weight and bias)
      for i, input_parameter in enumerate(inputs[params_idx:]):
          with nn.parameter_scope(scope):
              input_parameter = recorder_weight()(
                  input_parameter,
                  axes=axes,
                  training=self._training,
                  name="w{}".format(i),
              )
          new_inputs.append(input_parameter)
      return new_inputs
  
imports: import nnabla
  import nnabla.functions
  import numpy
  from collections import defaultdict
  from .graph_converter import FunctionModifier
  from .batch_normalization_folding import BatchNormalizationFoldingModifier
  from .batch_normalization_self_folding import BatchNormalizationSelfFoldingModifier
  from .remove_function import RemoveFunctionModifier
label_desc: Use image node_id 5 for calling the QuantizeNonQNNToRecordingModifier obj's underlying member method code with example usage: obj.add_recorder(f, inputs, cfg) and returns: new_inputs