code: def context(self, outdir, log_prefix):
          
          try:
              self._outdir = outdir
              self._log_prefix = log_prefix
              yield
          finally:
              self._log_prefix = None
              self._outdir = None
docs: Setup instance to extract metrics from the proper run
  
          :param outdir: run directory
          :param log_prefix: log filenames prefix