code: def test_pmf_val(rng):
      sphere = get_sphere("symmetric724")
      with warnings.catch_warnings():
          warnings.filterwarnings(
              "ignore",
              message=shm.descoteaux07_legacy_msg,
              category=PendingDeprecationWarning,
          )
          pmfgen = SHCoeffPmfGen(
              rng.random([2, 2, 2, 28]), sphere, None
          )
      point = np.array([1, 1, 1], dtype="float")
  
      for idx in [0, 5, 15, -1]:
          pmf = pmfgen.get_pmf(point)
          # Create a direction vector close to the vertex idx
          xyz = sphere.vertices[idx] + rng.random([3]) / 100
          pmf_idx = pmfgen.get_pmf_value(point, xyz)
          # Test that the pmf sampled for the direction xyz is correct
          npt.assert_array_almost_equal(pmf[idx], pmf_idx)
  
file_path: dipy/dipy/direction/tests/test_pmf.py
imports: import warnings
  import numpy
  import numpy.testing
  from dipy.core.gradients import gradient_table
  from dipy.core.sphere import HemiSphere, unit_octahedron
  from dipy.data import default_sphere, get_sphere
  from dipy.reconst import shm
  from dipy.direction.pmf import SimplePmfGen, SHCoeffPmfGen
  from dipy.reconst.csdeconv import ConstrainedSphericalDeconvModel
  from dipy.reconst.dti import TensorModel
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 1 for calling a global function with example usage: test_pmf_val(rng) without return types