class_docstr: A Profiler class that allows code profiling.
  
  Attributes
  ----------
      print_stats (bool, optional): prints profiling statistics.
      viz (bool, optional): visualizes the results using `snakeviz`.
  
      Bonus args and kwargs are passed to cProfile.Profile __init__
  
  Example
  -------
      with Profiler(print_stats=False, viz=True):
          fn(x, y)
code: def __init__(self, *args, **kwargs):
      self.print_stats = kwargs.pop("print_stats", True)
      self.viz = kwargs.pop("viz", False)
  
      super().__init__(*args, **kwargs)
  
file_path: ivy/ivy/utils/profiler.py
imports: import cProfile
  import pstats
  import subprocess
  import logging
  from tempfile import NamedTemporaryFile
  from importlib.util import find_spec
label_desc: Use image node_id 1 to create a new Profiler object from inherited base classes: cProfile with example: obj = Profiler()