Passing meta data from data Loader to custom loss function

I am trying to pass meta-data, for the reference labels that i will be using in a custom loss function. I am accessing the input (to model), labels, meta-data through the data loader. however I can’t seem to figure out a way to pass the meta-data to the loss function while fetching it from the data loader, as it keeps giving me an error saying the y_true labels don’t match with that of the expected model outputs. Does anyone have any idea how to pass meta-data from data loader into the loss function?