fix torch.distributed.elastic event docs (#64974)
Summary:
the example code wasn't working for me.
cc pietern mrshenli pritamdamania87 zhaojuanmao satgera rohan-varma gqchen aazzolini osalpekar jiayisuse SciPioneer H-Huang cbalioglu gcramer23
Pull Request resolved: https://github.com/pytorch/pytorch/pull/64974
Reviewed By: kiukchung, cbalioglu
Differential Revision: D30926481
Pulled By: edward-io
fbshipit-source-id: f5e32cc2b948b6ee30d84a8247856f39fc786f67