code: def test_update_sigma(global_random_seed):
      # make sure the two update_sigma() helpers are equivalent. The woodbury
      # formula is used when n_samples < n_features, and the other one is used
      # otherwise.
  
      rng = np.random.RandomState(global_random_seed)
  
      # set n_samples == n_features to avoid instability issues when inverting
      # the matrices. Using the woodbury formula would be unstable when
      # n_samples > n_features
      n_samples = n_features = 10
      X = rng.randn(n_samples, n_features)
      alpha = 1
      lmbda = np.arange(1, n_features + 1)
      keep_lambda = np.array([True] * n_features)
  
      reg = ARDRegression()
  
      sigma = reg._update_sigma(X, alpha, lmbda, keep_lambda)
      sigma_woodbury = reg._update_sigma_woodbury(
          X, alpha, lmbda, keep_lambda
      )
  
      np.testing.assert_allclose(sigma, sigma_woodbury)
  
imports: from math import log
  import numpy
  import pytest
  from sklearn import datasets
  from sklearn.linear_model import ARDRegression, BayesianRidge, Ridge
  from sklearn.utils import check_random_state
  from sklearn.utils._testing import assert_almost_equal, assert_array_almost_equal, assert_array_less
  from sklearn.utils.extmath import fast_logdet
label_desc: Use image node_id 13 for calling a global function with example usage: test_update_sigma(global_random_seed) without return types