def __eq__(self, other):
        return (isinstance(other, self.__class__) and
                other.package == self.package)
def tearDown(self):
        if hasattr(self, "rng_state"):
            torch.set_rng_state(self.rng_state)