It depends on which version of TensorFlow you are using. Things can change if you use a different version. Please read the “import” cell early in the notebook, which shows you the names of the functions you need:
import matplotlib.pyplot as plt
import numpy as np
import os
import tensorflow as tf
import tensorflow.keras.layers as tfl
from tensorflow.keras.preprocessing import image_dataset_from_directory
from tensorflow.keras.layers.experimental.preprocessing import RandomFlip, RandomRotation
So you should just reference them by the names they imported. You can see that the names you used are different than what they are using.