code: def test_fit_bivariate_normal(alpha):
      mu = [10, 10]
  
      sigma1 = 2.0
      sigma2 = 1.0
      N = 1000
  
      # poisson stats
      rtol = 2 * np.sqrt(N) / N
  
      x, y = bivariate_normal(mu, sigma1, sigma2, alpha, N).T
      mu_fit, sigma1_fit, sigma2_fit, alpha_fit = fit_bivariate_normal(
          x, y
      )
  
      if alpha_fit > np.pi / 2:
          alpha_fit -= np.pi
      elif alpha_fit < -np.pi / 2:
          alpha_fit += np.pi
  
      # Circular degeneracy in alpha: test sin(2*alpha) instead
      assert_allclose(
          np.sin(2 * alpha_fit), np.sin(2 * alpha), atol=2 * rtol
      )
      assert_allclose(mu, mu_fit, rtol=rtol)
      assert_allclose(sigma1_fit, sigma1, rtol=rtol)
      assert_allclose(sigma2_fit, sigma2, rtol=rtol)
  
file_path: astroML/astroML/stats/tests/test_stats.py
imports: import pytest
  import numpy
  from numpy.testing import assert_array_almost_equal, assert_array_equal, assert_allclose
  from astroML.stats import mean_sigma, median_sigmaG, sigmaG, fit_bivariate_normal
  from astroML.stats.random import bivariate_normal, trunc_exp, linear
label_desc: Use image node_id 6 for calling a global function with example usage: test_fit_bivariate_normal(alpha) without return types