code: def __init__(self, logfn, lineevents=0, linetimings=1):
      self.lineevents = lineevents and 1 or 0
      self.linetimings = (linetimings and lineevents) and 1 or 0
      self._prof = p = _hotshot.profiler(
          logfn, self.lineevents, self.linetimings
      )
  
      # Attempt to avoid confusing results caused by the presence of
      # Python wrappers around these functions, but only if we can
      # be sure the methods have not been overridden or extended.
      if self.__class__ is Profile:
          self.close = p.close
          self.start = p.start
          self.stop = p.stop
          self.addinfo = p.addinfo
  
file_path: catboost/contrib/tools/python/src/Lib/hotshot/__init__.py
imports: import _hotshot
  from _hotshot import ProfilerError
  from warnings import warnpy3k
label_desc: Use image node_id 1 to create a new Profile object  with example: obj = Profile(logfn, lineevents, linetimings)