class_docstr: A context manager that copies and restores the warnings filter upon
  exiting the context.
  
  The 'record' argument specifies whether warnings should be captured by a
  custom implementation of warnings.showwarning() and be appended to a list
  returned by the context manager. Otherwise None is returned by the context
  manager. The objects appended to the list are arguments whose attributes
  mirror the arguments to showwarning().
  
  The 'module' argument is to specify an alternative module to the module
  named 'warnings' and imported under that name. This argument is only useful
  when testing the warnings module itself.
  
  If the 'action' argument is not None, the remaining arguments are passed
  to warnings.simplefilter() as if it were called immediately on entering the
  context.
class_docstr_tok: ["A","context","manager","that","copies","and","restores","the","warnings","filter","upon","exiting","the","context",".","The","'record","'","argument","specifies","whether","warnings","should","be","captured","by","a","custom","implementation","of","warnings.showwarning","(",")","and","be","appended","to","a","list","returned","by","the","context","manager",".","Otherwise","None","is","returned","by","the","context","manager",".","The","objects","appended","to","the","list","are","arguments","whose","attributes","mirror","the","arguments","to","showwarning","(",")",".","The","'module","'","argument","is","to","specify","an","alternative","module","to","the","module","named","'warnings","'","and","imported","under","that","name",".","This","argument","is","only","useful","when","testing","the","warnings","module","itself",".","If","the","'action","'","argument","is","not","None",",","the","remaining","arguments","are","passed","to","warnings.simplefilter","(",")","as","if","it","were","called","immediately","on","entering","the","context","."]
code: def __repr__(self):
      args = []
      if self._record:
          args.append("record=True")
      if self._module is not sys.modules["warnings"]:
          args.append("module=%r" % self._module)
      name = type(self).__name__
      return "%s(%s)" % (name, ", ".join(args))
  
imports: import sys
label_desc: Use image node_id 2 for calling the catch_warnings obj's underlying member method code with example usage: obj.__repr__() and returns: unknown