code: def _redirect_stdout_to_str(*args, **kwargs):
      with io.StringIO() as stdout:
          old_stdout = sys.stdout
          sys.stdout = stdout
          try:
              yield stdout
          finally:
              sys.stdout = old_stdout
  
file_path: PaddleSeg/contrib/PanopticSeg/tools/analyze_model.py
imports: import argparse
  import io
  import sys
  import contextlib
  from collections import OrderedDict
  import paddle
  from paddle.hapi.static_flops import Table
  from paddle.hapi.dynamic_flops import count_parameters, register_hooks, count_io_info
  from paddleseg.utils import get_sys_env, logger, op_flops_funs, utils
  from paddlepanseg.cvlibs import Config, make_default_builder
label_desc: Use image node_id 2 for calling a global function with example usage: _redirect_stdout_to_str() without return types