code: def fibonacci_sphere(n_points, randomize=True):
      """
      Generate points on the surface of a sphere using Fibonacci Spiral.
  
      Parameters
      ----------
      n_points : int
          The number of points to generate on the sphere surface.
      randomize : bool, optional
          If True, randomize the starting point on the sphere. Default is True.
  
      Returns
      -------
      points : ndarray
          An array of 3D points representing coordinates on the sphere surface.
  
      """
      if not isinstance(n_points, int) or n_points <= 4:
          raise ValueError(
              "Number of points must be a positive integer greater than 4."
          )
  
      random_shift = 0
      if randomize:
          random_generator = np.random.default_rng()
          random_shift = random_generator.integers(0, n_points)
  
      indices = np.arange(n_points)
      offset = 2.0 / n_points
      increment = np.pi * (3.0 - np.sqrt(5.0))
  
      y = ((indices * offset) - 1) + (offset / 2)
      r = np.sqrt(1 - y**2)
      phi = ((indices + random_shift) % n_points) * increment
  
      x = np.cos(phi) * r
      z = np.sin(phi) * r
  
      points = np.column_stack((x, y, z))
      return points
  
imports: import numpy
  import warnings
  from scipy import optimize
  from dipy.core.geometry import cart2sphere, sphere2cart, vector_norm
  from dipy.core.onetime import auto_attr
  from dipy.reconst.recspeed import remove_similar_vertices
label_desc: Use image node_id 9 for calling a global function with example usage: fibonacci_sphere(n_points, randomize) and returns: points