def test_n_steps_between(self, config):
        """Test the number of frequency steps/periods between two time steps."""
        start, end, freq, expected_n_steps = config
        if isinstance(start, str):
            start = pd.Timestamp(start)
            end = pd.Timestamp(end)
            freq = pd.tseries.frequencies.to_offset(freq)
        n_steps = n_steps_between(end=end, start=start, freq=freq)
        assert n_steps == expected_n_steps
        n_steps_reversed = n_steps_between(end=start, start=end, freq=freq)
        assert n_steps_reversed == -expected_n_steps
Test the number of frequency steps/periods between two time steps.
darts/tests/utils/test_utils.py