def METHOD_NAME(dataloader, framework, distributed=False):
    """Generate common dataloader.
    Args:
        dataloader (generator): A dataloader which can yield tuple of (input, label)/(input, _)
            batched data.
        framework (str): The string of supported framework.
        distributed (bool, optional): Set to ``True`` to support distributed computing.
            Defaults to False.
    Returns:
        BaseDataLoader: neural_compressor built-in dataloader
    """
    if not isinstance(dataloader, DataLoader):
        assert hasattr(dataloader, "__iter__") and hasattr(
            dataloader, "batch_size"
        ), "dataloader must implement __iter__ method and batch_size attribute"
        assert (
            not distributed
        ), "Please use \
            neural_compressor.experimental.common.DataLoader to support distributed computing"
        return dataloader
    else:
        return DATALOADERS[framework](
            dataset=dataloader.dataset,
            batch_size=dataloader.batch_size,
            collate_fn=dataloader.collate_fn,
            last_batch=dataloader.last_batch,
            sampler=dataloader.sampler,
            batch_sampler=dataloader.batch_sampler,
            num_workers=dataloader.num_workers,
            pin_memory=dataloader.pin_memory,
            shuffle=dataloader.shuffle,
            distributed=bool(dataloader.distributed or distributed),
        )