class_docstr: 使用例子
  with Capturing() as output:
      do_something
  
  assert 'xxx' in output[0]
code: def __exit__(self, *args):
      self.append(
          self._stringio.getvalue() + self._stringioerr.getvalue()
      )
      if not self.no_del:
          del self._stringio, self._stringioerr  # free up some memory
      sys.stdout = self._stdout
      sys.stderr = self._stderr
  
imports: import os
  import sys
  import __main__
  from functools import wraps, partial
  from inspect import ismethod
  from copy import deepcopy
  from io import StringIO
  import time
  import signal
  import pytest
  import numpy
  from fastNLP.core.utils.utils import get_class_that_defined_method
  from fastNLP.envs.env import FASTNLP_GLOBAL_RANK
  from fastNLP.core.drivers.utils import distributed_open_proc
  from fastNLP.core.log import logger
label_desc: Use image node_id 3 for calling the Capturing obj's underlying member method code with example usage: obj.__exit__() without return types