class_docstr: Benchmarking a function of a parametric function.
  
  This will calculate time to execute setup, forward and backward
  methods of Function class.
  
  Args:
      func (function): It can be a function in either
          :module:`nnabla.functions` or
          :module:`nnabla.parametric_functions`.
      inspecs (:obj:`list` of :obj:`Inspec`): A list of ``Inspec``.
          They specify shape, initializer, and need_grad attributes.
      func_args (list): A list of function arguments passed to func.
      func_kwargs (dict): Keyword arguments passed to func.
      ext (str): Extension module, e.g. 'cuda', 'cudnn'.
      ext_kwargs (dict): Keyword arguments passed to extension APIs,
          e.g. ``context(*kw)``, ``synchronize(**kw).
      min_run (int): Minimum number of calling function
  
  Note:
      You should not pass any compositional function
      (a function constructed by multiple Functions) to ``func`` argument.
      Benchmark will take place only in the last function instance in the
      chain of a compositional function.
class_docstr_tok: ["Benchmarking","a","function","of","a","parametric","function",".","This","will","calculate","time","to","execute","setup",",","forward","and","backward","methods","of","Function","class",".","Args",":","func","(","function",")",":","It","can","be","a","function","in","either",":","module",":","`","nnabla.functions","`","or",":","module",":","`","nnabla.parametric_functions","`",".","inspecs","(",":","obj",":","`","list","`","of",":","obj",":","`","Inspec","`",")",":","A","list","of","``","Inspec","``",".","They","specify","shape",",","initializer",",","and","need_grad","attributes",".","func_args","(","list",")",":","A","list","of","function","arguments","passed","to","func",".","func_kwargs","(","dict",")",":","Keyword","arguments","passed","to","func",".","ext","(","str",")",":","Extension","module",",","e.g",".","'cuda","'",",","'cudnn","'",".","ext_kwargs","(","dict",")",":","Keyword","arguments","passed","to","extension","APIs",",","e.g",".","``","context","(","*","kw",")","``",",","``","synchronize","(","*","*","kw",")",".","min_run","(","int",")",":","Minimum","number","of","calling","function","Note",":","You","should","not","pass","any","compositional","function","(","a","function","constructed","by","multiple","Functions",")","to","``","func","``","argument",".","Benchmark","will","take","place","only","in","the","last","function","instance","in","the","chain","of","a","compositional","function","."]
code: def _calc_benchmark_stat(self, f):
      timer = Timer()
      i = 0
      while True:
          f()
          i += 1
          if i >= self.min_run:
              _, elapsed = timer.lap()
              if elapsed > self.min_time:
                  break
      return BenchmarkStat(elapsed / i, i)
  
imports: from __future__ import print_function
  import nnabla
  import nnabla.initializer
  import sys
  import importlib
  import time
  from collections import namedtuple
  import csv
label_desc: Use image node_id 2 for calling the FunctionBenchmark obj's underlying member method code with example usage: obj._calc_benchmark_stat(f) and returns: BenchmarkStat