code: def angle_3points(p0, p1, p2):
      ''' compute the angle in radians between three 3D points
  
      Calculated as the angle between p1-p0 and p2-p0.
  
      Args:
          p0, p1, p2:  indexable objects with
          indices 0, 1, 2 corresponding to 3D cartesian coordinates.
  
      Returns:
          Angle in radians between (p1-p0) and (p2-p0).
          0.0 if p0==p1 or p0==p2.
      '''
      vec1 = vector(p1, p0)
      vec2 = vector(p2, p0)
      return math.atan2(np.linalg.norm(np.cross(vec1, vec2)),
                        np.dot(vec1, vec2)f angle_3points(p0, p1, p2):
      ''' compute the angle in radians between three 3D points
  
      Calculated as the angle between p1-p0 and p2-p0.
  
      Args:
          p0, p1, p2:  indexable objects with
          indices 0, 1, 2 corresponding to 3D cartesian coordinates.
  
      Returns:
          Angle in radians between (p1-p0) and (p2-p0).
          0.0 if p0==p1 or p0==p2.
      '''
      vec1 = vector(p1, p0)
      vec2 = vector(p2, p0)
      return math.atan2(np.linalg.norm(np.cross(vec1, vec2)),
                        np.dot(vec1, vec2))
docs: compute the angle in radians between three 3D points
  
      Calculated as the angle between p1-p0 and p2-p0.
  
      Args:
          p0, p1, p2:  indexable objects with
          indices 0, 1, 2 corresponding to 3D cartesian coordinates.
  
      Returns:
          Angle in radians between (p1-p0) and (p2-p0).
          0.0 if p0==p1 or p0==p2.