Hi,
The guide you link to uses pad rather than pad_and_create_pixel_mask (the method has been renamed).
pad
pad_and_create_pixel_mask