def METHOD_NAME():
    def train_loader(
        dataset: Dataset,
        prediction_interval_length: float,
        context_interval_length: float,
        is_train: bool = True,
        override_args: dict = None,
    ) -> Iterable[DataBatch]:
        if override_args is None:
            override_args = {}
        if is_train:
            sampler = ContinuousTimeUniformSampler(
                num_instances=10,
                min_past=context_interval_length,
                min_future=prediction_interval_length,
            )
        else:
            sampler = ContinuousTimePredictionSampler(
                min_past=context_interval_length
            )
        splitter = ContinuousTimeInstanceSplitter(
            future_interval_length=prediction_interval_length,
            past_interval_length=context_interval_length,
            instance_sampler=sampler,
            freq=to_offset("H"),
        )
        kwargs = dict(
            dataset=dataset,
            transform=splitter,
            batch_size=10,
            stack_fn=partial(batchify, dtype=np.float32, variable_length=True),
        )
        kwargs.update(override_args)
        if is_train:
            return itertools.islice(TrainDataLoader(**kwargs), NUM_BATCHES)
        else:
            return InferenceDataLoader(**kwargs)
    return train_loader