code: def test_chi1():
      # EC density of F with infinite dfd is the same as chi^2 -- EC should be the
      # same.
      x = np.linspace(0.1, 10, 100)
      for dim in range(10):
          for dfn in range(5, 10):
              c = rft.ChiSquared(dfn=dfn)
              f = rft.FStat(dfn=dfn, dfd=np.inf)
              chi1 = c.density(dfn * x, dim)
              chi2 = f.density(x, dim)
              assert_almost_equal(chi1, chi2)
  
imports: import numpy
  import scipy.stats
  from scipy.special import gammaln, hermitenorm
  import pytest
  from numpy.testing import assert_almost_equal
  from ..None import rft
label_desc: Use image node_id 9 for calling a global function with example usage: test_chi1() without return types