def runctx(statement, globals, locals, filename=None, sort=-1):
    prof = Profile()
    try:
        prof = prof.runctx(statement, globals, locals)
    except SystemExit:
        pass

    if filename is not None:
        prof.dump_stats(filename)
    else:
        return prof.print_stats(sort)

# Backwards compatibility.
Run statement under profiler, supplying your own globals and locals,
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/profile.py/runctx