class_docstr: Profiling Event class.
  
  The event API is used to observe when demarcated events occur in your application, or to
  identify how long it takes to execute demarcated regions of code. Set annotations in the
  application to demarcate areas where events of interest occur.
  After running analysis, you can see the events marked in the Timeline pane.
  Event API is a per-thread function that works in resumed state.
  This function does not work in paused state.
  
  Parameters
  ----------
  name : string
      Name of the event
code: def __init__(self, name):
      self.name = name
      self.handle = ProfileHandle()
      check_call(
          _LIB.MXProfileCreateEvent(
              c_str(self.name), ctypes.byref(self.handle)
          )
      )
  
imports: import ctypes
  import contextlib
  import contextvars
  import warnings
  from .base import _LIB, check_call, c_str, ProfileHandle, c_str_array, py_str, KVStoreHandle
label_desc: Use image node_id 1 to create a new Event object from inherited base classes: object with example: obj = Event(name)