code: def restore(self):
          
          # NOTE: dup2 makes `self._from_fd` inheritable unconditionally
          self.redir_file.flush()
          os.dup2(self.orig_file.fileno(), self._from_fd)
docs: Restore `self.redir_file` to its original state.