'Support nested attribute path for getattr().
:param obj: Root object.
:param attr: Path of final attribute to get. E.g., "a.b.c.d"
:returns: The value of the final named attribute.
:raises: AttributeError will be raised if the path is invalid.'

def _multi_getattr(self, obj, attr):

    for attribute in attr.split('.'):
        obj = getattr(obj, attribute)
    return obj
