code: def test_gfa():
      g = gfa(np.ones(100))
      assert_equal(g, 0)
  
      g = gfa(np.ones((2, 100)))
      assert_equal(g, np.array([0, 0]))
  
      # The following series follows the rule (sqrt(n-1)/((n-1)^2))
      g = gfa(np.hstack([np.ones(9), [0]]))
      assert_almost_equal(g, np.sqrt(9.0 / 81))
      g = gfa(np.hstack([np.ones(99), [0]]))
      assert_almost_equal(g, np.sqrt(99.0 / (99.0**2)))
  
      # All-zeros returns a nan with no warning:
      g = gfa(np.zeros(10))
      assert_(np.isnan(g))
  
file_path: dipy/dipy/reconst/tests/test_odf.py
imports: import numpy
  from numpy.testing import assert_equal, assert_almost_equal, assert_
  from dipy.reconst.odf import OdfFit, OdfModel, minmax_normalize, gfa
  from dipy.core.subdivide_octahedron import create_unit_hemisphere
  from dipy.sims.voxel import multi_tensor, multi_tensor_odf
  from dipy.data import get_sphere
  from dipy.core.gradients import gradient_table, GradientTable
label_desc: Use image node_id 3 for calling a global function with example usage: test_gfa() without return types