code: def check(self, f):
      def backward_traverse(f, l):
          # list functions between input and f
          for inp in f.inputs:
              if inp.parent is not None:
                  l.append(inp.parent)
                  backward_traverse(inp.parent, l)
  
      def forward_traverse(f, l):
          # list functions between f and output
          for fref in f.outputs[0].function_references:
              l.append(fref)
              forward_traverse(fref, l)
  
      def is_skip_layer(f):
          skip_inputs_layers = self._config.skip_inputs_layers
          skip_outputs_layers = self._config.skip_outputs_layers
          if not skip_inputs_layers and not skip_outputs_layers:
              return False
  
          fs = []
          if skip_outputs_layers:
              forward_traverse(f, fs)
          fs = list(set([func.info.type_name for func in fs]))
          is_output_layer = True if skip_outputs_layers else False
          for skl in skip_outputs_layers:
              if skl in fs:
                  is_output_layer = False
                  break
  
          fs = []
          if skip_inputs_layers:
              backward_traverse(f, fs)
          is_input_layer = True if skip_inputs_layers else False
          fs = list(set([func.info.type_name for func in fs]))
          for skl in skip_inputs_layers:
              if skl in fs:
                  is_input_layer = False
                  break
  
          for skl in skip_inputs_layers:
              if f.info.type_name == skl and is_input_layer:
                  return True
          for skl in skip_outputs_layers:
              if f.info.type_name == skl and is_output_layer:
                  return True
          return False
  
      fn = f.info.type_name
      cfg = self._config
  
      # Do not record sink and bn
      if fn == "Sink" or fn == "BatchNormalization":
          return False
  
      # Only add recorder to specific layers
      # If record_layers empty, add to all layers
      record_layers = cfg.record_layers
      if record_layers and (fn not in record_layers):
          return False
  
      if is_skip_layer(f):
          return False
      return True
  
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 3 for calling the QuantizeNonQNNToRecordingModifier obj's underlying member method code with example usage: obj.check(f) and returns: True, False, False, False, False, False, True, True