code: def test_onesidedF():
      # EC densities of one sided F should be a difference of
      # F EC densities
      x = np.linspace(0.1, 10, 100)
      for dfd in [40, 50, np.inf]:
          for dfn in range(2, 10):
              for dim in range(7):
                  f1 = rft.FStat(dfd=dfd, dfn=dfn).density(x, dim)
                  f2 = rft.FStat(dfd=dfd, dfn=dfn - 1).density(x, dim)
                  onesided = rft.OneSidedF(dfd=dfd, dfn=dfn).density(
                      x, dim
                  )
                  assert_almost_equal(onesided, 0.5 * (f1 - f2))
  
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 24 for calling a global function with example usage: test_onesidedF() without return types