def _check_ds_stride(self, ds_regular, ds_stride, stride: int):
        """
        Every `stride`-th values in a dataset with stride=1 should be identical to the dataset stridden with `stride
        """
        # if the un-stridden length is a multiple of the stride
        if len(ds_regular) % stride == 0:
            assert len(ds_regular) == len(ds_stride) * stride

        for idx, batch_str in enumerate(ds_stride):
            for entry_s, entry_r in zip(batch_str, ds_regular[idx * stride]):
                if entry_s is not None and entry_r is not None:
                    np.testing.assert_almost_equal(entry_s, entry_r)
                else:
                    assert entry_s == entry_r

        Every `stride`-th values in a dataset with stride=1 should be identical to the dataset stridden with `stride
        
darts/tests/utils/torch_datasets/test_torch_datasets.py