"transforms" helper function has no attribute ToTensor

I was reading a tutorial on the Pytorch website. Part of the tutorial used the “transforms” helper function.
So far it’s no problem.
The next step used an attribute named ToTensor() from the helper function.
I got an error.
AttributeError: module ‘detection.transforms’ has no attribute ‘ToTensor’
I went to the source of the helper function to find out what is going on.
I couldn’t find an attribute named ToTensor.
Why does it use the attribute in the tutorial?

that’s a torchvision transform: ToTensor — Torchvision 0.12 documentation

I think that the tutorial was written based on an old version (v0.8.2) of Torchvision source code.
You can see ToTensor() method in the file:

Further, if you look at the Google Colab file, you can notice that somewhere down the line, they checkout a specific Github tag (v0.8.2) before executing the code.

# Download TorchVision repo to use some files from
# references/detection
git clone https://github.com/pytorch/vision.git
cd vision
git checkout v0.8.2

cp references/detection/utils.py ../
cp references/detection/transforms.py ../
cp references/detection/coco_eval.py ../
cp references/detection/engine.py ../
cp references/detection/coco_utils.py ../