I can provide some use case.
Lets assume you are testing Windows Calculator as a desktop app.
You generate test data and need to verify that sum or prod works.
Every time calculation is done result is displayed in a window that is an object.
Object name is
Aliases.Microsoft_WindowsCalculator.Calculator.NavView.LandmarkTarget.Display_is_XXXX.TextContainer.NormalOutput
Where XXXX is the result of your calculation. E.g. 2 or 5 or 2023.
And you need to access this object to verify
When you try to get properties of a “parent” object
Aliases.Microsoft_WindowsCalculator.Calculator.NavView.LandmarkTarget
with a dir() function you get this
['_IDispatchWrapper__cookie', '_IDispatchWrapper__hasOwnAttr', '_IDispatchWrapper__raiseBadParamCount', '_IDispatchWrapper__raiseObjectIsNotCallable', '_IDispatchWrapper__raiseObjectIsNotConvertableToType', '_IDispatchWrapper__raiseObjectIsNotIndexable', '_IDispatchWrapper__safeEval', '__bool__', '__call__', '__callmethod__', '__class__', '__del__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__float__', '__format__', '__ge__', '__getattr__', '__getattribute__', '__getitem__', '__getprop__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__int__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setitem__', '__setprop__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__']
I am not an expert in Python so if someone knows how to you solve this problem with a dictionary (of reasonable size) or some other way please share.