class_docstr: Tests `get_shared_times` function defined in `darts.utils.data.tabularization`.
class_docstr_tok: ["Tests","`","get_shared_times","`","function","defined","in","`","darts.utils.data.tabularization","`","."]
docstr: Tests that `get_shared_times` can accept time index
  inputs instead of `TimeSeries` inputs; combinations
  of time index and `TimeSeries` inputs are also tested.
docstr_tok: ["Tests","that","`","get_shared_times","`","can","accept","time","index","inputs","instead","of","`","TimeSeries","`","inputs",";","combinations","of","time","index","and","`","TimeSeries","`","inputs","are","also","tested","."]
code: 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)
      )
  
imports: from math import gcd
  import pandas
  import pytest
  from darts.utils.data.tabularization import get_shared_times
  from darts.utils.timeseries_generation import linear_timeseries
label_desc: Use image node_id 12 for calling the TestGetSharedTimes obj's underlying member method code with example usage: obj.test_shared_times_time_index_inputs() without return types