How to implement focal loss in pytorch?

I took a look at the source of kornias non-binary focal loss implementation here. Could you please explain what is the purpose of alpha parameter here? As far as I can see this is a float constant and not a tensor, meaning that each class will be weighted with same float value.