Tried to replicate this
neg = NegateGradient.apply
but got

AttributeError: type object ‘NegateGradient’ has no attribute ‘apply’

and
NegateGradient.__dict__ gives:

dict_proxy({‘doc’: ’ forward identity, backward negation, useful in minimax ',
‘module’: ‘main’,
‘backward’: <staticmethod at 0x111a5e440>,
‘forward’: <staticmethod at 0x111a5e398>})