DistributionLoss loss function for LSTM quantile forecasts

I seen a method in which a distributionloss loss function is implemented into an LSTM model for which you just need to pass the quantile levels and the model’s forecasts return the different quantiles you specified and median value.

I found the method here.

Does anyone know how a Tensorflow implementation like this could work? Very curious cause it’s a very cool and interesting extension to LSTM for risk management purposes.