def METHOD_NAME(app):
    with app.app_context():
        db_mock = get_db()
        test_entities = {
            "users": [{"user_id": i + 1} for i in range(6)],
            "tracks": [{"track_id": 1, "owner_id": 1}],
            "playlists": [{"playlist_id": 1, "playlist_owner_id": 1}],
            "follows": [
                {"follower_user_id": 4, "followee_user_id": 1},
                {"follower_user_id": 2, "followee_user_id": 4},
                {"follower_user_id": 3, "followee_user_id": 4},
                {"follower_user_id": 3, "followee_user_id": 5},
                {"follower_user_id": 5, "followee_user_id": 3},
            ],
        }
        populate_mock_db(db_mock, test_entities)
        test_actions = {
            "reposts": [
                {"user_id": 4, "repost_item_id": 1, "repost_type": "track"},
                {"user_id": 4, "repost_item_id": 1, "repost_type": "playlist"},
                {
                    "user_id": 2,
                    "repost_item_id": 1,
                    "repost_type": "track",
                    "is_repost_of_repost": True,
                },
                {
                    "user_id": 3,
                    "repost_item_id": 1,
                    "repost_type": "track",
                    "is_repost_of_repost": True,
                },
                {
                    "user_id": 3,
                    "repost_item_id": 1,
                    "repost_type": "playlist",
                    "is_repost_of_repost": True,
                },
                {
                    "user_id": 5,
                    "repost_item_id": 1,
                    "repost_type": "playlist",
                    "is_repost_of_repost": True,
                },
            ]
        }
        populate_mock_db(db_mock, test_actions)
        with db_mock.scoped_session() as session:
            args = {
                "limit": 10,
                "user_id": 4,
                "valid_types": [NotificationType.REPOST_OF_REPOST],
            }
            user4_notifications = get_notifications(session, args)
            assert len(user4_notifications) == 3
            assert_notification(
                notification=user4_notifications[0],
                group_id="repost_of_repost:1:type:playlist",
                is_seen=False,
                actions_length=1,
                reposter_user_ids=[3],
            )
            assert_notification(
                notification=user4_notifications[1],
                group_id="repost_of_repost:1:type:track",
                is_seen=False,
                actions_length=2,
                reposter_user_ids=[2, 3],
            )
            assert "repost_of_repost" not in user4_notifications[2]["group_id"]
            args = {
                "limit": 10,
                "user_id": 3,
                "valid_types": [NotificationType.REPOST_OF_REPOST],
            }
            user3_notifications = get_notifications(session, args)
            assert len(user3_notifications) == 2
            assert_notification(
                notification=user3_notifications[0],
                group_id="repost_of_repost:1:type:playlist",
                is_seen=False,
                actions_length=1,
                reposter_user_ids=[5],
            )
            assert "repost_of_repost" not in user3_notifications[1]["group_id"]
            args = {
                "limit": 10,
                "user_id": 1,
                "valid_types": [NotificationType.REPOST_OF_REPOST],
            }
            user1_notifications = get_notifications(session, args)
            for notif in user1_notifications:
                assert "repost_of_repost" not in notif["group_id"]