code: def sphere_ball_intersection(R, r):
      
      x = (2 * R**2 - r**2) / (2 * R)  # x coord of plane
      if x >= -R:
          return 2 * np.pi * R * (R - x)
      if x < -R:
          return 4 * np.pi * R**2
docs: Compute the surface area of the intersection of sphere of radius R centered
      at (0, 0, 0) with a ball of radius r centered at (R, 0, 0).
  
      Parameters
      ----------
      R : float, sphere radius
      r : float, ball radius
  
      Returns
      --------
      area: float, the surface are.