Hello,
I seems find another two issue in Cell [22] in Clone Portal sample notebook. clone portal users groups and content | ArcGIS for Developers
Below is the screen shot of code that may have issue.

Issue 1: In this line,
target.content.create_folder(user, folder)
I checked API of create_folder() method, it writes
<SPAN class="" style="background: #f1c40f; font-weight: bold; padding: 0px 6px;">create_folder</SPAN>(folder, owner=None), we have folder first, then the owner
But in the sample notebook code, the order is opposite.
Shouldn't we use, target.content.create_folder(folder, user) instead?
Issue 2:
I got another error when I access the folder title using folder.title. It returns following error message. For testing I create a test script.

The folder does have the key title, but for some reason we can't access it using folder.title in API. It causes problem in this sample notebook, since it uses folder.title to access the folder title.
Thanks