code: def find_valid_time_interval_for_cv(df):
      """Find time interval of interception among all the time series from dict.
  
      Parameters
      ----------
          df : pd.DataFrame
              data with column ``ds``, ``y``, and ``ID``
  
      Returns
      -------
          str
              time interval start
          str
              time interval end
      """
      # Creates first time interval based on data from first key
      time_interval_intersection = df[df["ID"] == df["ID"].iloc[0]][
          "ds"
      ]
      for df_name, df_i in df.groupby("ID"):
          time_interval_intersection = pd.merge(
              time_interval_intersection, df_i, how="inner", on=["ds"]
          )
          time_interval_intersection = time_interval_intersection[
              ["ds"]
          ]
      start_date = time_interval_intersection["ds"].iloc[0]
      end_date = time_interval_intersection["ds"].iloc[-1]
      return start_date, end_date
  
imports: from __future__ import annotations
  import logging
  import math
  from collections import OrderedDict
  from dataclasses import dataclass
  from typing import TYPE_CHECKING, List, Optional, Tuple
  import numpy
  import pandas
label_desc: Use image node_id 12 for calling a global function with example usage: find_valid_time_interval_for_cv(df) and returns: start_date,  end_date