code: def _grad_equality_constraints(vects):
      r"""Return normals to the surface constraint (which corresponds to
      the gradient of the implicit function).
  
      Parameters
      ----------
      vects : array-like (N * 3)
          Points on the sphere.
      Returns
      -------
      array-like (N, N * 3)
          grad[i, j] contains :math:`\partial f_i / \partial x_j`.
  
      """
  
      N = vects.shape[0] // 3
      vects = vects.reshape((N, 3))
      vects = (vects.T / np.sqrt((vects**2).sum(1))).T
      grad = np.zeros((N, N * 3))
      for i in range(3):
          grad[:, i * N : (i + 1) * N] = np.diag(vects[:, i])
      return grad
  
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 11 for calling a global function with example usage: _grad_equality_constraints(vects) and returns: grad