class_docstr: Function profiler object.
  
  This is usually not directly used by users. It's created via
  :func:`profile`, and attached to a decorated
  function object as an attribute ``profiler``. See ``profile`` function for
  details.
code: def __init__(
      self,
      fn,
      condition=None,
      profile_class=cProfile.Profile,
      print_freq=0,
      sort_keys=None,
      print_restrictions=None,
  ):
      self.fn = fn
      if condition is None:
          condition = _null_condition
      self.condition = condition
      self.profile_class = profile_class
      self.print_freq = print_freq
      self.reset_stats()
      # https://docs.python.org/2/library/profile.html#pstats.Stats.sort_stats
      if sort_keys is None:
          sort_keys = ("cumulative", "time", "calls")
      self.sort_keys = sort_keys
      if print_restrictions is None:
          print_restrictions = (40,)
      self.print_restrictions = print_restrictions
      atexit.register(self._atexit)
  
file_path: nnabla/python/src/nnabla/utils/function_profile.py
imports: import atexit
  import cProfile
  import pstats
label_desc: Use image node_id 1 to create a new FunctionProfile object from inherited base classes: object with example: obj = FunctionProfile(fn, condition, profile_class, print_freq, sort_keys, print_restrictions)