result = bot.get_user_profile_photos(message.from_user.id)
photos = result['photos']
if not photos:
message.reply_text('No profile photos!')
return
for photo_sizes in photos:
photo = max(photo_sizes, key=lambda x: x['width'])
file_id = photo['file_id']
message.reply_photo(file_id, caption=file_id)
TypeError: 'UserProfilePhotos' object is not subscriptable