class_docstr: Raise ResourceDenied if an exception is raised while the context manager
  is in effect that matches the specified exception and attributes.
class_docstr_tok: ["Raise","ResourceDenied","if","an","exception","is","raised","while","the","context","manager","is","in","effect","that","matches","the","specified","exception","and","attributes","."]
code: def __init__(self, exc, **kwargs):
      self.exc = exc
      self.attrs = kwargs
  
imports: import errno
  import unittest
  from test import support
  from test.support import os_helper
  from test.support import socket_helper
  from test.support import ResourceDenied
  from test.test_urllib2 import sanepathname2url
  import os
  import socket
  import urllib.error
  import urllib.request
  import sys
label_desc: Use image node_id 1 to create a new TransientResource object from inherited base classes: object with example: obj = TransientResource(exc)