class_docstr: Function to capture stdout and stderr streams with timestamps
  
  stackoverflow.com/questions/4984549/merge-and-sync-stdout-and-stderr/5188359
class_docstr_tok: ["Function","to","capture","stdout","and","stderr","streams","with","timestamps","stackoverflow.com\/questions\/4984549\/merge-and-sync-stdout-and-stderr\/5188359"]
code: def __init__(self, name, impl):
      self._name = name
      self._impl = impl
      self._buf = ""
      self._rows = []
      self._lastidx = 0
      self.default_encoding = locale.getpreferredencoding(
          do_setlocale=False
      )
  
file_path: nipype/nipype/utils/subprocess.py
imports: import os
  import sys
  import gc
  import errno
  import select
  import locale
  import datetime
  from pathlib import Path
  from subprocess import Popen, STDOUT, PIPE
  from .filemanip import canonicalize_env, read_stream
  from ..None import logging
label_desc: Use image node_id 1 to create a new Stream object  with example: obj = Stream(name, impl)