def __init__(self, *args, **kwargs):
    _OriginalGreenletClass.__init__(self, *args, **kwargs)

    if type(ProfilingGreenlet._HUB) != ProfilingHub:
      raise ValueError(
        'Profiler must be instantiated before creating a ProfilingGreenlet')

    # Assign an integer ID to each greenlet, unique while the server process
    # is live.
    self.greenlet_id = ProfilingGreenlet._HUB.get_next_greenlet_id()

    # Obtain the fully-qualified name of the function this greenlet invokes.
    self.fn_name = None
    if args:
      run = args[0]
    else:
      run = kwargs.get('run')
    if run is not None:
      class_name = run.__module__
      if hasattr(run, 'im_class'):
        class_name += '.' + run.im_class.__name__

      self.fn_name = class_name + '.' + run.__name__

    # Only assigned if this is a request-handling greenlet.
    self.first_exec_span_index = 0
    self.request_info = ProfilingGreenlet._REQUEST_INFO_CLASS(self)
Create a ProfilingGreenlet.
dataset/ETHPy150Open tellapart/gevent_request_profiler/tellapart/frontend/gevent_profiler.py/ProfilingGreenlet.__init__