code: def segment_midpoints_by_vertices(self, vertices):
          
  
          segments = set()
  
          for vertex in vertices:
              neighbours = self.identify_vertex_neighbours(vertex)
              segments.update( min( tuple((vertex, n1)), tuple((n1, vertex))) for n1 in neighbours )
  
          segs = np.array(list(segments))
  
          new_midpoint_lonlats = self.segment_midpoints(segments=segs)
  
          return new_midpoint_lonlats
docs: Add midpoints to any segment connected to the vertices in the
          list / array provided.