def get_dataloader(
    data_iter,
    shuffle=True,
    is_labeled=False,
    batch_size=3000,
    world_size=1,
    rank=0,
    local_rank=-1,
):
    """
    Function to get data iterator over a list of data objects.

    Args:
        data_iter (generator): Data generator.
        shuffle (bool): Whether the data is shuffled. Defaults to True.
        is_labeled (bool): Whether the data objects are labeled data.
                            Defaults to False.
        batch_size (int): Number of tokens per batch. Defaults to 3000.
        world_size (int): Total number of GPUs that will be used. Defaults to 1.
        rank (int): Rank of the current GPU. Defaults to -1.

    Returns:
        DataIterator
    """
    sampler = IterableDistributedSampler(world_size, rank, local_rank)
    return ChunkDataLoader(
        data_iter, batch_size, shuffle=shuffle, is_labeled=is_labeled, sampler=sampler
    )

    Function to get data iterator over a list of data objects.

    Args:
        data_iter (generator): Data generator.
        shuffle (bool): Whether the data is shuffled. Defaults to True.
        is_labeled (bool): Whether the data objects are labeled data.
                            Defaults to False.
        batch_size (int): Number of tokens per batch. Defaults to 3000.
        world_size (int): Total number of GPUs that will be used. Defaults to 1.
        rank (int): Rank of the current GPU. Defaults to -1.

    Returns:
        DataIterator
    
utils_nlp/models/transformers/extractive_summarization.py