Since `bpy.data.grease_pencils` is now legacy, we need to look at `bpy.data.grease_pencils_v3` instead.