def test_shared_times_time_index_inputs(self):
        """
        Tests that `get_shared_times` can accept time index
        inputs instead of `TimeSeries` inputs; combinations
        of time index and `TimeSeries` inputs are also tested.
        """
        series_1 = linear_timeseries(start=0, end=10, freq=1)
        series_2 = linear_timeseries(start=0, end=20, freq=2)
        # `stop=10+1` since `stop` is exclusive
        intersection = pd.RangeIndex(
            start=series_2.start_time(), stop=series_1.end_time() + 1, step=2
        )
        assert intersection.equals(get_shared_times(series_1.time_index, series_2))
        assert intersection.equals(get_shared_times(series_1, series_2.time_index))
        assert intersection.equals(
            get_shared_times(series_1.time_index, series_2.time_index)
        )

        Tests that `get_shared_times` can accept time index
        inputs instead of `TimeSeries` inputs; combinations
        of time index and `TimeSeries` inputs are also tested.
        
darts/tests/utils/tabularization/test_get_shared_times.py