docs: def check_frequencies(
      feed: "Feed", *, as_df: bool = False, include_warnings: bool = False
  ) -> List:
      """
      Analog of :func:`check_agency` for ``feed.frequencies``.
      """
      table = "frequencies"
      problems = []
  
      # Preliminary checks
      if feed.frequencies is None:
          return problems
  
      f = feed.frequencies.copy()
      problems = check_for_required_columns(problems, table, f)
      if problems:
          return format_problems(problems, as_df=as_df)
  
      if include_warnings:
          problems = check_for_invalid_columns(problems, table, f)
  
      # Check trip_id
      problems = check_column_linked_id(
          problems, table, f, "trip_id", feed.trips
      )
  
      # Check start_time and end_time
      time_cols = ["start_time", "end_time"]
      for col in time_cols:
          problems = check_column(problems, table, f, col, valid_time)
  
      for col in time_cols:
          f[col] = f[col].map(hp.timestr_to_seconds)
  
      # Start_time should be earlier than end_time
      cond = f["start_time"] >= f["end_time"]
      problems = check_table(
          problems, table, f, cond, "start_time not earlier than end_time"
      )
  
      # Headway periods should not overlap
      f = f.sort_values(["trip_id", "start_time"])
      for __, group in f.groupby("trip_id"):
          a = group["start_time"].values
          b = group["end_time"].values
          indices = np.flatnonzero(a[1:] < b[:-1]).tolist()
          if indices:
              problems.append(
                  [
                      "error",
                      "Headway periods for the same trip overlap",
                      table,
                      indices,
                  ]
              )
  
      # Check headway_secs
      v = lambda x: x >= 0
      problems = check_column(problems, table, f, "headway_secs", v)
  
      # Check exact_times
      v = lambda x: x in range(2)
      problems = check_column(
          problems, table, f, "exact_times", v, column_required=False
      )
  
      return format_problems(problems, as_df=as_df)