Project: 039_A_Theoretically-Principled_Sparse_Connected_and_Ri | Function: angle_between_vectors (iclr)

system: You are an expert Python programmer implementing algorithms from scientific papers.
Complete the masked function based on the algorithm description.
Follow Python best practices and maintain consistent code style.
Return **only** the complete Python function code.

user: Complete this Python function:

**DESCRIPTION:** Computes angles between vectors for dihedral angle computation, essential for SCHull graph rigidity guarantees

**KEY TERMS:** {
  "np.arccos(temp)": "dihedral angle computation",
  "np.dot(v0, v1)/(np.linalg.norm(v0)*np.linalg.norm(v1))": "cosine of angle between vectors",
  "val": "computed angle for rigidity"
}

**CONTEXT CODE:** import math

import numpy as np


# Coordinate Transforms
# -----------------------

def cartesian_to_xspherical(x, y, z):
  " Return spherical coords from x-axis"
  r = np.sqrt(x**2 + y**2 + z**2)
  theta = np.arccos(x/r)
  phi = np.arctan2(z, y)
  return r, theta, phi

def cartesian_to_yspherical(x, y, z):
  " Return spherical coords from y-axis"
  r = np.sqrt(x**2 + y**2 + z**2)
  theta = np.arccos(y/r)
  phi = np.arctan2(z, x)
  return r, theta, phi

def cartesian_to_zspherical(x, y, z):
  " Return spherical coords from z-axis"
  r = np.sqrt(x**2 + y**2 + z**2)
  theta = math.atan2(math.sqrt(x * x + y * y), z)
  phi = math.atan2(y, x)
  return r, theta, phi



def planar_normal(v0, v1):
    return np.cross(v0, v1)/np.linalg.norm(np.cross(v0, v1))

def project_onto_plane(vectors, plane_normal):
    return vectors - np.dot(vectors, plane_normal)[:,np.newaxis]*plane_normal

def angle_between_vectors(v0, v1):
    raise NotImplementedError("Function implementation has been masked for testing")

Complete the function implementation replacing "raise NotImplementedError".