def METHOD_NAME(permission, obj):
    """Extract all the effective roles for a given permission and object,
    acquired roles included
    """
    roles = security.get_roles_for_permission(permission, obj)
    if obj.acquiredRolesAreUsedBy(permission):
        roles.extend(METHOD_NAME(permission, obj.aq_parent))
    return list(set(roles))