code: def _time_interval_check(df, dt_col, id_col=None):
      """
      This check is used to verify whether all the time intervals of datetime column
      are consistent.
      """
      if id_col is not None:
          # _id_list = list(np.unique(df[id_col]))
          _id_list = df[id_col].unique()
      # check whether exists multi id
      if id_col is not None and len(_id_list) > 1:
          flag = True
  
          def get_interval(x):
              df_column = x[dt_col]
              interval = df_column.shift(-1) - df_column
              unique_intervals = interval[:-1].unique()
              return unique_intervals
  
          group = df.groupby(id_col).apply(get_interval)
          for ind in group.index:
              unique_intervals = group[ind]
              if len(unique_intervals) > 1:
                  flag = False
          if flag is True:
              return True, None
          else:
              logging.warning(
                  "There are irregular interval(more than one interval length)"
                  " among the data. You can call .resample(interval).impute() "
                  "first to clean the data manually, or set repair=True when "
                  "initialize TSDataset."
              )
              return False, None
      else:
          df_column = df[dt_col]
          intervals = df_column.shift(-1) - df_column
          unique_intervals = intervals[:-1].unique()
          if len(unique_intervals) > 1:
              logging.warning(
                  "There are irregular interval(more than one interval length)"
                  " among the data. You can call .resample(interval).impute() "
                  "first to clean the data manually, or set repair=True when "
                  "initialize TSDataset."
              )
              return False, intervals
          return True, intervals
  
file_path: BigDL/python/chronos/src/bigdl/chronos/data/utils/quality_inspection.py
imports: import pandas
  import numpy
  from bigdl.nano.utils.common import invalidInputError
  import logging
label_desc: Use image node_id 4 for calling a global function with example usage: _time_interval_check(df, dt_col, id_col) and returns: True,  intervals, unique_intervals, True,  None, False,  None, False,  intervals