code: def order_edges(edges):
      r
      edge = edges[0]
      edges = edges[1:]
  
      ordered_edges = [edge]
  
      num_max = len(edges)
      while len(edges) > 0 and num_max > 0:
  
          match = edge[1]
  
          for search_edge in edges:
              vertex = search_edge[0]
              if match == vertex:
                  edge = search_edge
                  edges.remove(edge)
                  ordered_edges.append(search_edge)
                  break
          num_max -= 1
  
      return ordered_edges
docs: r"""Return an ordered traversal of the edges of a two-dimensional polygon.
  
      Parameters
      ----------
      edges: (2, N) ndarray
          List of unordered line segments, where each
          line segment is represented by two unique
          vertex codes.
  
      Returns
      -------
      ordered_edges: (2, N) ndarray