class_docstr: Context manager that will save NumPy's random generator's state when entering and
  restore the original state when exiting.
class_docstr_tok: ["Context","manager","that","will","save","NumPy","'s","random","generator","'s","state","when","entering","and","restore","the","original","state","when","exiting","."]
code: def __exit__(self, exc_type, exc_val, exc_tb):
      self._random_state.set_state(self._state)
  
imports: import numpy
  from numpy.random import RandomState
  from numpy.testing import assert_allclose
  import pandas
  import pytest
  from arch.univariate import arch_model
  from arch.univariate.distribution import Normal, StudentsT
  from arch.univariate.mean import ConstantMean
  from arch.univariate.volatility import APARCH, EGARCH, FIGARCH, GARCH, HARCH, BootstrapRng, ConstantVariance, EWMAVariance, FixedVariance, MIDASHyperbolic, RiskMetrics2006
label_desc: Use image node_id 3 for calling the PreservedState obj's underlying member method code with example usage: obj.__exit__(exc_type, exc_val, exc_tb) without return types