How to give equal importance of all labels while dealing with unbalanced samples

may i know what is discussed here?(How can I use class_weights when training?)
I am unable to completely understand what they discussed in the above discussion.