def METHOD_NAME(self, batch):
    merged_batch = {}
    gis_list = []
    gis_tp = []
    for k in batch:
        if 'sentence1_gis' == k:
            gis = batch['gis1']
            gis = self.get_gis(gis, batch['sentence1_gis'])
            if gis.prov_ids is not None:
                gis_list.append({
                    'input_ids': gis.input_ids,
                    'attention_mask': gis.attention_mask,
                    'token_type_ids': gis.token_type_ids,
                    'rel_type_ids': gis.rel_type_ids,
                    'absolute_position_ids': gis.absolute_position_ids,
                    'relative_position_ids': gis.relative_position_ids,
                    'prov_ids': gis.prov_ids,
                    'city_ids': gis.city_ids,
                    'dist_ids': gis.dist_ids
                })
            else:
                gis_list.append({
                    'input_ids':
                    gis.input_ids,
                    'attention_mask':
                    gis.attention_mask,
                    'token_type_ids':
                    gis.token_type_ids,
                    'rel_type_ids':
                    gis.rel_type_ids,
                    'absolute_position_ids':
                    gis.absolute_position_ids,
                    'relative_position_ids':
                    gis.relative_position_ids
                })
            gis_tp.append(torch.LongTensor([1]).to(self.device))
        elif 'sentence2_gis' == k:
            gis = batch['gis2']
            gis = self.get_gis(gis, batch['sentence2_gis'])
            if gis.prov_ids is not None:
                gis_list.append({
                    'input_ids': gis.input_ids,
                    'attention_mask': gis.attention_mask,
                    'token_type_ids': gis.token_type_ids,
                    'rel_type_ids': gis.rel_type_ids,
                    'absolute_position_ids': gis.absolute_position_ids,
                    'relative_position_ids': gis.relative_position_ids,
                    'prov_ids': gis.prov_ids,
                    'city_ids': gis.city_ids,
                    'dist_ids': gis.dist_ids
                })
            else:
                gis_list.append({
                    'input_ids':
                    gis.input_ids,
                    'attention_mask':
                    gis.attention_mask,
                    'token_type_ids':
                    gis.token_type_ids,
                    'rel_type_ids':
                    gis.rel_type_ids,
                    'absolute_position_ids':
                    gis.absolute_position_ids,
                    'relative_position_ids':
                    gis.relative_position_ids
                })
            gis_tp.append(torch.LongTensor([0]).to(self.device))
        elif 'qid' in k or 'labels' in k:
            merged_batch[k] = batch[k].to(self.device)
        elif not k.startswith('gis'):
            merged_batch[k] = batch[k].to(self.device)
    if len(gis_list) > 0:
        merged_batch['gis_list'] = gis_list
    if len(gis_tp) > 0:
        merged_batch['gis_tp'] = gis_tp
    return merged_batch