@contextmanager<EOL>def memoryit_block(group_by='<STR_LIT>', limit=<NUM_LIT:10>, label='<STR_LIT>'):
tracemalloc.start()<EOL>_start = tracemalloc.take_snapshot()<EOL>try:<EOL><INDENT>yield<EOL><DEDENT>finally:<EOL><INDENT>_end = tracemalloc.take_snapshot()<EOL>stats = _end.compare_to(_start, group_by)<EOL>_print(stats, limit, label)<EOL><DEDENT>
追踪代码块内存消耗情况

:param group_by: 统计分组，有 'filename', 'lineno', 'traceback' 可选
:param limit: 限制输出行数
:param label: 代码块标签