code: def test_against_anderson_gumbel_r(self):
      rng = np.random.default_rng(7302761058217743)
      # c that produced critical value of statistic found w/ root_scalar
      x = stats.genextreme(
          0.051896837188595134, loc=0.5, scale=1.5
      ).rvs(size=1000, random_state=rng)
      res = goodness_of_fit(
          stats.gumbel_r, x, statistic="ad", random_state=rng
      )
      ref = stats.anderson(x, dist="gumbel_r")
      assert_allclose(res.statistic, ref.critical_values[0])
      assert_allclose(
          res.pvalue, ref.significance_level[0] / 100, atol=5e-3
      )
  
imports: import os
  import numpy
  import numpy.testing
  from numpy.testing import assert_allclose, assert_equal
  import pytest
  from scipy import stats
  from scipy.optimize import differential_evolution
  from .test_continuous_basic import distcont
  from scipy.stats._distn_infrastructure import FitError
  from scipy.stats._distr_params import distdiscrete
  from scipy.stats import goodness_of_fit
label_desc: Use image node_id 9 for calling the TestGoodnessOfFit obj's underlying member method code with example usage: obj.test_against_anderson_gumbel_r() without return types