human
Complete this python program:
def attach_pyinstrument_profiler():
assistant
#Here is the Python program you requested.

    """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.
    """
    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)