class_docstr: Capture IO to/from a given os-level filedescriptor. 
code: def start(self):
      try:
          os.fstat(self._savefd)
      except OSError:
          raise ValueError(
              "saved filedescriptor not valid, "
              "did you call start() twice?"
          )
      if self.targetfd == 0 and not self.tmpfile:
          fd = os.open(devnullpath, os.O_RDONLY)
          os.dup2(fd, 0)
          os.close(fd)
          if hasattr(self, "_oldsys"):
              setattr(
                  sys, patchsysdict[self.targetfd], DontReadFromInput()
              )
      else:
          os.dup2(self.tmpfile.fileno(), self.targetfd)
          if hasattr(self, "_oldsys"):
              setattr(sys, patchsysdict[self.targetfd], self.tmpfile)
  
imports: import os
  import sys
  import py
  import tempfile
label_desc: Use image node_id 2 for calling the FDCapture obj's underlying member method code with example usage: obj.start() without return types