Access labels in ConcatDataset

Is there a way to access the labels of a dataset after using ConcatDataset in a way like how the MNIST labels are accessed with dataset.targets?

ConcatDataset will assign the passed datasets to an internal attribute self.datasets and won’t change these datasets directly.
If the passed datasets had the .target attribute, you can still assess it via:

concat_dataset.datasets[0].target # assuming the first internal dataset has the target attribute