class_docstr: An error-collecting object which supports error recovery.
  
  It is intended to be used like a context manager:
  
  >>> with Errors("Top-level error message") as errs:
  >>>     ...
class_docstr_tok: ["An","error-collecting","object","which","supports","error","recovery",".","It","is","intended","to","be","used","like","a","context","manager",":",">",">",">","with","Errors","(","``","Top-level","error","message","''",")","as","errs",":",">",">",">","..."]
docstr: Helper for implementing "requireAlmostEqual" and "checkAlmostEqual".
  Upon failure, invokes continuation "k" with the error message.
  
  At the moment, only tests on "numpy.ndarray" are supported.
docstr_tok: ["Helper","for","implementing","``","requireAlmostEqual","''","and","``","checkAlmostEqual","''",".","Upon","failure",",","invokes","continuation","``","k","''","with","the","error","message",".","At","the","moment",",","only","tests","on","``","numpy.ndarray","''","are","supported","."]
code: def almostEqualAndThen(self, x, y, msg, k):
      """
      Helper for implementing "requireAlmostEqual" and "checkAlmostEqual".
      Upon failure, invokes continuation "k" with the error message.
  
      At the moment, only tests on "numpy.ndarray" are supported.
      """
      if isinstance(x, np.ndarray) and isinstance(y, np.ndarray):
          np.testing.assert_allclose(
              x,
              y,
              rtol=self.rtol,
              atol=self.atol,
              equal_nan=True,
              verbose=True,
          )
      else:
          raise RuntimeError("Unsupported almost equal test")
  
imports: import difflib
  import io
  import numpy
  import onnx
  import onnx.helper
  import torch
  import torch.jit
  import torch.onnx
label_desc: Use image node_id 4 for calling the Errors obj's underlying member method code with example usage: obj.almostEqualAndThen(x, y, msg, k) without return types