def METHOD_NAME(args, mode="train"):
    """Load data to DataLoader"""
    if args.task == "paws":
        processor = MrpcProcessor()
    if args.task == "xnli":
        processor = XNLIProcessor()
    if mode == "train":
        examples = processor.get_train_examples(args.data_dir)
    elif mode == "dev":
        examples = processor.get_dev_examples(args.data_dir)
    else:
        examples = processor.get_test_examples(args.data_dir)
    datagenerator = DataGenerator(examples)
    def collate_fn(batch):
        def create_padded_sequence(key, padding_value):
            """Pad sequence to max length"""
            pad_sequence = []
            max_len = 0
            for example in batch:
                if len(example[key]) > max_len:
                    max_len = len(example[key])
            for example in batch:
                pad_sequence.append(example[key] + [padding_value] * (max_len - len(example[key])))
            return np.array(pad_sequence, dtype="int64")
        text_a = create_padded_sequence("text_a", 0)  # pad text_a input_ids
        text_b = create_padded_sequence("text_b", 0)  # pad text_b input_ids
        text_a_token_type_ids = create_padded_sequence("text_a_token_type_ids", 0)  # pad text_a_token_type_ids
        text_b_token_type_ids = create_padded_sequence("text_b_token_type_ids", 1)  # pad text_b_token_type_ids
        label = create_padded_sequence("label", 0)  # label will not pad, just convert to numpy array
        input_ids = np.concatenate([text_a, text_b], axis=-1)[:, : args.max_seq_length]
        token_type_ids = np.concatenate([text_a_token_type_ids, text_b_token_type_ids], axis=-1)[
            :, : args.max_seq_length
        ]
        return input_ids, token_type_ids, label
    if mode in ("dev", "test"):
        dataloader = DataLoader(datagenerator, batch_size=args.eval_batch_size, shuffle=False, collate_fn=collate_fn)
    else:
        sampler = DistributedBatchSampler(
            datagenerator, batch_size=args.train_batch_size, shuffle=True, drop_last=False
        )
        dataloader = DataLoader(datagenerator, batch_sampler=sampler, collate_fn=collate_fn)
    return dataloader, processor