human
Complete the below
def attach_pyinstrument_profiler():

    ''''Run the pyinstrument profiler in the background and dump its output to
    stdout when the process receives SIGTRAP. In general, you probably want to
    use the facilities in inbox.util.profiling instead.'
    '''
assistant
#Here is the Python program you requested.
    profiler = Profiler()
    profiler.start()
    def handle_signal(signum, frame):
        print profiler.output_text(color=True)
        delattr(profiler, '_root_frame')
    signal.signal(signal.SIGTRAP, handle_signal)