def METHOD_NAME(self, x, y, atol=1e-8, rtol=1e-5, msg=None):
    diff = x.float() - y.float()
    diff_norm = torch.norm(diff)
    other_norm = torch.norm(y.float())
    if msg is None:
        msg = "|input - other| > {} + {} * |other|".format(
            atol, rtol
        )
    self.assertLessEqual(
        diff_norm,
        atol + rtol * other_norm,
        msg=msg,
    )