code: def _compute_path_loop(
      self,
      coordt,
      vertex_size,
      loop_size,
      angle1,
      angle2,
      trans_inv,
      angle_padding_fraction=0.1,
      arrow_size=None,
      arrow_width=None,
  ):
      import numpy as np
  
      # Special argument for loop size to scale with vertices
      if loop_size < 0:
          loop_size = -loop_size * vertex_size
  
      # Pad angles to make a little space for tight arrowheads
      angle1, angle2 = (
          angle1 * (1 - angle_padding_fraction)
          + angle2 * angle_padding_fraction,
          angle1 * angle_padding_fraction
          + angle2 * (1 - angle_padding_fraction),
      )
  
      # Too large wedges, just use a quarter
      if angle2 - angle1 > pi / 3:
          angle_mid = (angle2 + angle1) * 0.5
          angle1 = angle_mid - pi / 6
          angle2 = angle_mid + pi / 6
  
      start = vertex_size / 2 * np.array([cos(angle1), sin(angle1)])
      end = vertex_size / 2 * np.array([cos(angle2), sin(angle2)])
      amix = 0.05
      aux1 = loop_size * np.array(
          [
              cos(angle1 * (1 - amix) + angle2 * amix),
              sin(angle1 * (1 - amix) + angle2 * amix),
          ]
      )
      aux2 = loop_size * np.array(
          [
              cos(angle1 * amix + angle2 * (1 - amix)),
              sin(angle1 * amix + angle2 * (1 - amix)),
          ]
      )
  
      if not self._directed:
          vertices = np.vstack(
              [
                  start,
                  aux1,
                  aux2,
                  end,
                  aux2,
                  aux1,
                  start,
              ]
          )
          codes = ["MOVETO"] + ["CURVE4"] * 6
      else:
          # Tweak the bezier points
          aux1 *= (loop_size + arrow_size) / loop_size
          aux2 *= (loop_size + arrow_size) / loop_size
          # Angle between end/tip and vertex centre
          theta = angle2
          voff_unity = np.array([cos(theta), sin(theta)])
          voff_unity_90 = voff_unity @ [[0, 1], [-1, 0]]
          headbase = end + arrow_size * voff_unity
          headleft = headbase + 0.5 * arrow_width * voff_unity_90
          headright = headbase - 0.5 * arrow_width * voff_unity_90
          vertices = np.vstack(
              [
                  start,
                  aux1,
                  aux2,
                  headbase,
                  headleft,
                  end,
                  headright,
                  headbase,
                  aux2,
                  aux1,
                  start,
              ]
          )
          codes = (
              ["MOVETO"]
              + ["CURVE4"] * 3
              + ["LINETO"] * 4
              + ["CURVE4"] * 3
          )
  
      # Offset to place and transform to data coordinates
      vertices = trans_inv(coordt + vertices)
      codes = [getattr(mpl.path.Path, x) for x in codes]
      path = mpl.path.Path(
          vertices,
          codes=codes,
      )
      return path
  
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 5 for calling the EdgeCollection obj's underlying member method code with example usage: obj._compute_path_loop(coordt, vertex_size, loop_size, angle1, angle2, trans_inv, angle_padding_fraction, arrow_size, arrow_width) and returns: path