code: def _get_forces_alt(vects, alpha=2.0, **kwargs):
      """Electrostatic-repulsion objective function. The alpha parameter
      controls the power repulsion (energy varies as $1 / r^\alpha$) [1]_. For
      $\alpha = 1.0$, this corresponds to electrostatic interaction energy.
      The weights ensure equal importance of each shell to the objective
      function [2]_ [3]_.
  
      Parameters
      ----------
      vects : array-like (N * 3,)
          Points on the sphere.
      alpha : float
          Controls the power of the repulsion. Default is 1.0.
      weights : array-like (N, N)
          Weight values to the electrostatic energy.
  
      Returns
      -------
      energy : float
          Sum of all interactions between any two vectors.
  
      References
      ----------
      .. [1] Papadakis, N. G., et al. "Minimal gradient encoding for robust
             estimation of diffusion anisotropy." Magnetic Resonance Imaging
             2000 Jul; 18(6): 671-679.
      .. [2] Cook, P. A., Symms, M. Boulby, P. A., Alexander, D. C. "Optimal
             acquisition orders of diffusion‐weighted MRI measurements." Journal
             of Magnetic Resonance Imaging 2007 Apr; 25(5): 1051-1058.
      .. [3] Caruyer, E., Lenglet, C., Sapiro, G. and Deriche, R. "Design of
             multishell sampling schemes with uniform coverage in diffusion
             MRI." Magnetic Resonance in Medicine 2013 Jun; 69(6): 1534-1540.
  
      """
  
      nb_points = vects.shape[0] // 3
      weights = kwargs.get("weights", np.ones((nb_points, nb_points)))
      charges = vects.reshape((nb_points, 3))
      all_charges = np.concatenate((charges, -charges))
      all_charges = all_charges[:, None]
      r = charges - all_charges
      r_mag = np.sqrt((r * r).sum(-1))[:, :, None]
      with warnings.catch_warnings():
          warnings.simplefilter("ignore")
          potential = 1 / r_mag**alpha
  
      d = np.arange(len(charges))
      potential[d, d] = 0
      potential = potential[:nb_points] + potential[nb_points:]
      potential = weights * potential.sum(-1)
      potential = potential.sum()
      return potential
  
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 12 for calling a global function with example usage: _get_forces_alt(vects, alpha) and returns: potential