I highly highly recommend against doing this!!!! By doing a password recovery you are on the hook for any illegitimate content that the person might have uploaded/shared and might get you in real legal trouble. Instead I recommend filing a complaint without claiming the account.
I would argue opposite, For a long time JS had this issue where when you iterated on keys in a dictionary you had to ensure you were skipping methods etc via .hasOwnProperty check. Python by making clear distinction between contents and functionality avoids this.