I see below error if just replace Queue in the code.
    tens = SimpleQueue()
NameError: name 'SimpleQueue' is not defined

And I see another error if change the code to torch.multiprocessing.SimpleQueue()
    print("in consumer process, get %d tensors, still %d left in the queue" % (ten_count, tens.qsize()))
AttributeError: 'SimpleQueue' object has no attribute 'qsize'

The best practices webpage says: multiprocessing.queues.SimpleQueue. It’s the reason that I think there might be a typo here.