code: def merge_overlapping_intervals(df):
      for i in range(len(df) - 1):
          stop = df["stop"][i]
          start = df["start"][i + 1]
          id_stop = df["session_id"][i]
          id_start = df["session_id"][i + 1]
          if (stop - start) > 0 and id_stop == id_start:
              start_new = df["start"][i]
              df.at[i + 1, "start"] = start_new
              df.at[i, "start"] = -1
  
      # Delete redundant rows
      df = df[df["start"] != -1].copy()
      df.reset_index(inplace=True)
      df.drop(["index"], axis=1, inplace=True)
      return df
  
file_path: speechbrain/recipes/LibriParty/VAD/libriparty_prepare.py
imports: import numpy
  import pandas
  import json
  import logging
  from collections import OrderedDict
label_desc: Use image node_id 4 for calling a global function with example usage: merge_overlapping_intervals(df) and returns: df