code: def stderr_handle(self):
          
          if self.stderr_file is not None:
              # Needed to prevent any error that could appear.
              # See issue 6267
              try:
                  handle = codecs.open(self.stderr_file, 'w', encoding='utf-8')
              except Exception:
                  handle = None
          else:
              handle = None
  
          return handle
docs: Get handle to stderr_file.