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"]
docstr: Read from the file descriptor. If 'drain' set, read until EOF.
docstr_tok: ["Read","from","the","file","descriptor",".","If","'drain","'","set",",","read","until","EOF","."]
code: def read(self, drain=0):
      "Read from the file descriptor. If 'drain' set, read until EOF."
      while self._read(drain) is not None:
          if not drain:
              break
  
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 3 for calling the Stream obj's underlying member method code with example usage: obj.read(drain) without return types