def _explode_permissions(entry):
    """
    This function flattens permission objects in order to distribute permission attributes
    out to the individual permission entries.  For example, this code will take the following
    entry:

    ```
    {
        "user_name": "owner@company.com",
        "all_permissions": [
            {
                "permission_level": "CAN_MANAGE",
                "inherited": False,
            },
            {
                "permission_level": "CAN_VIEW",
                "inherited": True,
                "inherited_from_object": "/jobs/"
            }
        ]
    }
    ```

    and return the following entries:

    ```
    [
        {
            "user_name": "owner@company.com",
            "permission_level": "CAN_MANAGE",
            "inherited": False,
        },
        {
            "user_name": "owner@company.com",
            "permission_level": "CAN_VIEW",
            "inherited": True,
            "inherited_from_object": "/jobs/"
        }
    ]
    ```
    """
    all_permissions, rest = (lambda all_permissions, **rest: (all_permissions, rest))(**entry)
    return [{**permission, **rest} for permission in all_permissions]