code: def __enter__(self):
      self._old_targets.append(getattr(sys, self._stream))
      setattr(sys, self._stream, self._new_target)
      return self._new_target
  
imports: import abc
  import sys
  import warnings
  from collections import deque
  from functools import wraps
label_desc: Use image node_id 2 for calling the _RedirectStream obj's underlying member method code with example usage: obj.__enter__() and returns: self