def get_true_test_labels(self, label_map, dataset):
        """
        Get the true testing label values.

        Args:
            label_map (dict): A dictionary object to map a label (str) to an ID (int).
                dataset (TensorDataset): The TensorDataset for evaluation.
            dataset (Dataset): The test Dataset instance.

        Returns:
            list: A list of lists. The size of the retured list is the number
                of testing samples.
            Each sublist represents the predicted label for each token.
        """

        num_samples = len(dataset.tensors[0])
        label_id2str = {v: k for k, v in label_map.items()}
        attention_mask_all = dataset.tensors[1].data.numpy()
        trailing_mask_all = dataset.tensors[2].data.numpy()
        label_ids_all = dataset.tensors[3].data.numpy()
        seq_len = len(trailing_mask_all[0])
        labels = []

        for idx in range(num_samples):
            attention_mask = attention_mask_all[idx]
            trailing_mask = trailing_mask_all[idx]
            label_ids = label_ids_all[idx]
            one_sample = []

            for sid in range(seq_len):
                if attention_mask[sid] == 0:
                    break

                if not trailing_mask[sid]:
                    continue

                label_id = label_ids[sid]
                one_sample.append(label_id2str[label_id])
            labels.append(one_sample)
        return labels

        Get the true testing label values.

        Args:
            label_map (dict): A dictionary object to map a label (str) to an ID (int).
                dataset (TensorDataset): The TensorDataset for evaluation.
            dataset (Dataset): The test Dataset instance.

        Returns:
            list: A list of lists. The size of the retured list is the number
                of testing samples.
            Each sublist represents the predicted label for each token.
        
utils_nlp/models/transformers/named_entity_recognition.py