code: def get_shared_times_bounds(
      *series_or_times: Sequence[Union[TimeSeries, pd.Index, None]]
  ) -> Union[Tuple[pd.Index, pd.Index], None]:
      """
      Returns the latest `start_time` and the earliest `end_time` among all of the non-`None` `series_or_times`;
      these are (non-tight) lower and upper `bounds` on the intersection of all these `series_or_times` respectively.
      If no potential overlap exists between all of the specified series, `None` is returned instead.
  
      Notes
      -----
      If all of the specified `series_or_times` are of the same frequency, then `get_shared_times_bounds`
      returns tight `bounds` (i.e. the earliest and latest time within the intersection of all the timeseries
      is returned). To see this, suppose we have three equal-frequency series with observations made at different
      times:
          Series 1: ------
          Series 2:    ------
          Series 3:  ------
      Here, each `-` denotes an observation at a specific time. In this example, `find_time_overlap_bounds` will
      return the times at `LB` and `UB`:
                      LB
          Series 1: ---|---|
          Series 2:    |---|---
          Series 3:  --|---|-
                           UB
      If the specified timeseries are *not* all of the same frequency, then the returned `bounds` is potentially non-tight
      (i.e. `LB <= intersection.start_time() < intersection.end_time() <= UB`, where `intersection` are the times shared
      by all specified timeseries)
  
      Parameters
      ----------
      series_or_times
          The `TimeSeries` and/or `pd.Index` values to compute intersection `bounds` for; any provided `None` values
          are ignored.
  
      Returns
      -------
      bounds
          Tuple containing the latest `start_time` and earliest `end time` among all specified `timeseries`, in that
          order. If no potential overlap exists between the specified series, then `None` is returned instead. Similarly,
          if no non-`None` `series_or_times` were specified, `None` is returned.
  
      Raises
      ------
      TypeError
          If the series and/or times in `series_or_times` don't all share the same type of `time_index`
          (i.e. either all `pd.DatetimeIndex` or `pd.RangeIndex`).
  
      """
      start_times, end_times = [], []
      for val in series_or_times:
          if (val is not None) and (len(val) > 0):
              start_times.append(
                  val.start_time()
                  if isinstance(val, TimeSeries)
                  else val[0]
              )
              end_times.append(
                  val.end_time()
                  if isinstance(val, TimeSeries)
                  else val[-1]
              )
      if not start_times:
          bounds = None
      else:
          times_types = [type(time) for time in start_times]
          raise_if_not(
              len(set(times_types)) == 1,
              (
                  "Specified series and/or times must all "
                  "have the same type of `time_index` "
                  "(i.e. all `pd.RangeIndex` or all `pd.DatetimeIndex`)."
              ),
          )
          # If `start_times` empty, no series were specified -> `bounds = (1, -1)` will
          # be 'converted' to `None` in next line:
          bounds = (
              (max(start_times), min(end_times))
              if start_times
              else (1, -1)
          )
          # Specified timeseries share no overlapping periods.
          if bounds[1] < bounds[0]:
              bounds = None
      return bounds
  
imports: import warnings
  from functools import reduce
  from math import inf
  from typing import Dict, List, Optional, Sequence, Tuple, Union
  from itertools import chain
  import numpy
  import pandas
  from numpy.lib.stride_tricks import as_strided
  from darts.logging import get_logger, raise_if, raise_if_not, raise_log
  from darts.timeseries import TimeSeries
  from darts.utils.utils import get_single_series, series2seq
label_desc: Use image node_id 11 for calling a global function with example usage: get_shared_times_bounds() and returns: bounds