def METHOD_NAME(dataloader, loss):
    try:
        if hasattr(dataloader, 'get_config_dict'):
            train_loader = dataloader.get_config_dict()
        else:
            loader_params = {}
            loader_params['batch_size'] = dataloader.batch_size if hasattr(dataloader, 'batch_size') else 'unknown'
            if hasattr(dataloader, 'sampler'):
                loader_params['sampler'] = fullname(dataloader.sampler)
            if hasattr(dataloader, 'batch_sampler'):
                loader_params['batch_sampler'] = fullname(dataloader.batch_sampler)
        dataloader_str = """**DataLoader**:\n\n`{}` of length {} with parameters: