'User' object Attribute Error While Extracting Tracking Codes (Python Scripting)

When attempting to extract tracking codes for a particular user via Python script, I am receiving an AttributeError as follows:

‘User’ object has no attribute ‘tracking_codes’.

Based on the documentation I’ve read, I should be able to pull tracking codes using the ‘tracking_codes’ attribute. Any input on addressing this issue would be greatly appreciate.