code: def _check_for_duplicates(durations, events):
          
          # Setting up DataFrame to detect duplicates
          df = pd.DataFrame({"t": durations, "e": events})
  
          # Finding duplicated event times
          dup_times = df.loc[df["e"] != 0, "t"].duplicated(keep=False)
  
          # Finding duplicated events and event times
          dup_events = df.loc[df["e"] != 0, ["t", "e"]].duplicated(keep=False)
  
          # Detect duplicated times with different event types
          return (dup_times & (~dup_events)).any()
docs: Checks for duplicated event times in the data set. This is narrowed to detecting duplicated event times
          where the events are of different types