def METHOD_NAME(other_user, user, db, dao: Dao):
    def key_factory(key_user, descr, expire_at, roles):
        return dao.create_api_key(
            key_user.id,
            BaseApiKey.model_validate(
                dict(description=descr, expire_at=expire_at, roles=roles)
            ),
            descr,
        )
    keys = [
        key_factory(user, "key", '2030-01-01', []),
        key_factory(other_user, "other_key", '2030-01-01', []),
        key_factory(other_user, "other_user_is_user", '2030-01-01', []),
        key_factory(user, "user_is_user", '2030-01-01', []),
    ]
    yield {k.description: k for k in keys}
    for key in keys:
        db.delete(key)
    db.commit()