code: def test_hemisphere_subdivide():
      def flip(vertices):
          x, y, z = vertices.T
          f = (
              (z < 0)
              | ((z == 0) & (y < 0))
              | ((z == 0) & (y == 0) & (x < 0))
          )
          return 1 - 2 * f[:, None]
  
      decimals = 6
      # Test HemiSphere.subdivide
      # Create a hemisphere by dividing a hemi-icosahedron
      hemi1 = HemiSphere.from_sphere(unit_icosahedron).subdivide(4)
      vertices1 = np.round(hemi1.vertices, decimals)
      vertices1 *= flip(vertices1)
      order = np.lexsort(vertices1.T)
      vertices1 = vertices1[order]
  
      # Create a hemisphere from a subdivided sphere
      sphere = unit_icosahedron.subdivide(4)
      hemi2 = HemiSphere.from_sphere(sphere)
      vertices2 = np.round(hemi2.vertices, decimals)
      vertices2 *= flip(vertices2)
      order = np.lexsort(vertices2.T)
      vertices2 = vertices2[order]
  
      # The two hemispheres should have the same vertices up to their order
      nt.assert_array_equal(vertices1, vertices2)
  
      # Create a hemisphere from vertices
      hemi3 = HemiSphere(xyz=hemi1.vertices)
      nt.assert_array_equal(hemi1.faces, hemi3.faces)
      nt.assert_array_equal(hemi1.edges, hemi3.edges)
  
imports: import numpy
  import numpy.testing
  import pytest
  import warnings
  from dipy.core.sphere import Sphere, HemiSphere, unique_edges, unique_sets, faces_from_sphere_vertices, disperse_charges, fibonacci_sphere, disperse_charges_alt, _get_forces, _get_forces_alt, unit_octahedron, unit_icosahedron, hemi_icosahedron
  from dipy.core.geometry import cart2sphere, vector_norm
  from dipy.core.sphere_stats import random_uniform_on_sphere
  from dipy.utils.optpkg import optional_package
label_desc: Use image node_id 15 for calling a global function with example usage: test_hemisphere_subdivide() and returns: unknown