(Possible) Error in 13.assets.module.managed-delete-files.step line 377 in File API video
I think the URI should be public://assets/managed/
So that whole line would be:
if (!strpos($file->uri, 'public://assets/managed/') === 0) {
Although, I could be wrong. Chris can you confirm?
I downloaded the code pack from right underneath the video player via the link.
I noticed the code is correct in the video that goes along with this file "How to delete managed files"

Thank you for reporting this, I will take a look and see if an adjustment needs to be made.
Cheers!
Chris