def METHOD_NAME(self):
    if not any(output.is_linked for output in self.outputs):
        return
    vertices_s = self.inputs['Vertices'].sv_get()
    edges_s = self.inputs['Edges'].sv_get(default=[[]])
    faces_s = self.inputs['Faces'].sv_get()
    init_masks_s = self.inputs['InitMask'].sv_get() # mandatory input
    obstacle_masks_s = self.inputs['ObstacleMask'].sv_get(default = [[]])
    wave_front_out = []
    wave_distances_out = []
    start_idxs_out = []
    meshes = zip_long_repeat(vertices_s, edges_s, faces_s, init_masks_s, obstacle_masks_s)
    for vertices, edges, faces, init_mask, obstacle_masks in meshes:
        bm = bmesh_from_pydata(vertices, edges, faces)
        if obstacle_masks:
            if self.mode == 'face':
                fullList(obstacle_masks, len(faces))
                bm.faces.layers.int.new("wave_obstacle")
                bm.faces.ensure_lookup_table()
                fill_faces_layer(bm, obstacle_masks, "wave_obstacle", int, 1)
            else: #verts
                fullList(obstacle_masks, len(vertices))
                bm.verts.layers.int.new("wave_obstacle")
                bm.verts.ensure_lookup_table()
                fill_verts_layer(bm, obstacle_masks, "wave_obstacle", int, 1)
        if self.mode == 'face':
            by_vert = self.face_mode == 'vertex'
            new_wave_front = wave_markup_faces(bm, init_mask, neighbour_by_vert=by_vert, find_shortest_path=True)
            distance = bm.faces.layers.float.get("wave_path_distance")
            start = bm.faces.layers.int.get("wave_start_index")
            new_distances = [face[distance] for face in bm.faces]
            new_starts = [face[start] for face in bm.faces]
        else: # verts
            by_edge = self.vert_mode == 'edge'
            new_wave_front = wave_markup_verts(bm, init_mask, neighbour_by_edge=by_edge, find_shortest_path=True)
            distance = bm.verts.layers.float.get("wave_path_distance")
            start = bm.verts.layers.int.get("wave_start_index")
            new_distances = [vert[distance] for vert in bm.verts]
            new_starts = [vert[start] for vert in bm.verts]
        bm.free()
        wave_front_out.append(new_wave_front)
        wave_distances_out.append(new_distances)
        start_idxs_out.append(new_starts)
    self.outputs['WaveFront'].sv_set(wave_front_out)
    self.outputs['WaveDistance'].sv_set(wave_distances_out)
    self.outputs['StartIdx'].sv_set(start_idxs_out)