docstr: Compute edge angles for both starting and ending vertices.
  
  NOTE: The domain of atan2 is (-pi, pi].
docstr_tok: ["Compute","edge","angles","for","both","starting","and","ending","vertices",".","NOTE",":","The","domain","of","atan2","is","(","-pi",",","pi","]","."]
code: def _compute_edge_angles(path, trans, directed, curved):
      """Compute edge angles for both starting and ending vertices.
  
      NOTE: The domain of atan2 is (-pi, pi].
      """
      positions = trans(path.vertices)
  
      # first angle
      if not directed:
          x1, y1 = positions[0]
          x2, y2 = positions[1]
      elif not curved:
          x1, y1 = positions[1]
          x2, y2 = positions[0]
      else:
          x1, y1 = positions[3]
          x2, y2 = positions[2]
      angle1 = atan2(y2 - y1, x2 - x1)
  
      # second angle
      if not directed:
          x1, y1 = positions[-1]
          x2, y2 = positions[-2]
      else:
          x1, y1 = positions[-3]
          x2, y2 = positions[-1]
      angle2 = atan2(y2 - y1, x2 - x1)
      return (angle1, angle2)
  
imports: from math import atan2, cos, pi, sin
  from igraph.drawing.baseclasses import AbstractEdgeDrawer
  from igraph.drawing.metamagic import AttributeCollectorBase
  from igraph.drawing.matplotlib.utils import find_matplotlib
  from igraph.drawing.utils import get_bezier_control_points_for_curved_edge, FakeModule
label_desc: Use image node_id 3 for calling the EdgeCollection obj's underlying member method code with example usage: obj._compute_edge_angles(path, trans, directed, curved) and returns: angle1,  angle2