def METHOD_NAME(obj, permissions_group):
    def _getattr(obj, permissions_group):
        return getattr(obj, permissions_group)
    return functools.reduce(_getattr, [obj] + permissions_group.split("."))