code: def calculate_solid_angles(R):
      """Calculates the solid angles of plane triangles. Implements the method of
      Van Oosterom and Strackee [VanOosterom]_ with some modifications. Assumes
      that input points have unit norm."""
      # Original method uses a triple product `R1 . (R2 x R3)` for the numerator.
      # This is equal to the determinant of the matrix [R1 R2 R3], which can be
      # computed with better stability.
      numerator = np.linalg.det(R)
      denominator = 1 + (
          np.einsum("ij,ij->i", R[:, 0], R[:, 1])
          + np.einsum("ij,ij->i", R[:, 1], R[:, 2])
          + np.einsum("ij,ij->i", R[:, 2], R[:, 0])
      )
      return np.abs(2 * np.arctan2(numerator, denominator))
  
file_path: catboost/contrib/python/scipy/py3/scipy/spatial/_spherical_voronoi.py
imports: import warnings
  import numpy
  import scipy
  from .None import _voronoi
  from scipy.spatial import cKDTree
label_desc: Use image node_id 1 for calling a global function with example usage: calculate_solid_angles(R) and returns: np