code: def check_equal_time_index(*ys, mode="equal"):
      """Check that time series have the same (time) indices.
  
      Parameters
      ----------
      *ys : tuple of sktime compatible time series data containers
          must be pd.Series, pd.DataFrame or 1/2D np.ndarray, or None
          can be Series, Panel, Hierarchical, but must be pandas or numpy
          note: this assumption is not checked by the function itself
              if check is needed, use check_is_scitype or check_is_mtype before call
      mode : str, "equal" or "contained", optional, default = "equal"
          if "equal" will check for all indices being exactly equal
          if "contained", will check whether all indices are subset of ys[0].index
  
      Raises
      ------
      ValueError
          if mode = "equal", raised if there are at least two non-None entries of ys
              of which pandas indices are not the same
          if mode = "contained, raised if there is at least one non-None ys[i]
              such that ys[i].index is not contained in ys[o].index
          np.ndarray are considered having (pandas) integer range index on axis 0
      """
      from sktime.datatypes._utilities import get_index_for_series
  
      # None entries are ignored
      y_not_None = [y for y in ys if y is not None]
  
      # if there is no or just one element, there is nothing to compare
      if len(y_not_None) < 2:
          return None
  
      # only validate indices if data is passed as pd.Series
      first_index = get_index_for_series(y_not_None[0])
  
      for i, y in enumerate(y_not_None[1:]):
          y_index = get_index_for_series(y)
  
          if mode == "equal":
              failure_cond = not first_index.equals(y_index)
              msg = (
                  f"(time) indices are not the same, series 0 and {i} "
                  f"differ in the following: {first_index.symmetric_difference(y_index)}."
              )
          elif mode == "contains":
              failure_cond = not y_index.isin(first_index).all()
              msg = (
                  f"(time) indices of series {i} are not contained in index of series 0,"
                  f" extra indices are: {y_index.difference(first_index)}"
              )
          else:
              raise ValueError('mode must be "equal" or "contains"')
  
          if failure_cond:
              raise ValueError(msg)
  
file_path: sktime/sktime/utils/validation/series.py
imports: from typing import Union
  import numpy
  import pandas
label_desc: Use image node_id 9 for calling a global function with example usage: check_equal_time_index() and returns: None