Ha, I thought you might have overlooked the suggested fix. 
Have a look at the Windows FAQ 55, where the if-clause protection is given as a code snippet:
import torch

def main()
    for i, data in enumerate(dataloader):
        # do something here

if __name__ == '__main__':
    main()