code: def test_roy1():
      # EC densities of Roy with dfn=1 should be twice EC densities of Hotelling
      # T^2's.
      x = np.linspace(0.1, 10, 100)
      for dfd in [40, 50, np.inf]:
          for k in [1, 4, 6]:
              for dim in range(7):
                  h = 2 * rft.Hotelling(dfd=dfd, k=k).density(x, dim)
                  r = rft.Roy(dfd=dfd, k=k, dfn=1).density(x, dim)
                  assert_almost_equal(h, r)
  
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 23 for calling a global function with example usage: test_roy1() without return types