def METHOD_NAME(gl, user):
    token = user.impersonationtokens.create(
        {"name": "token1", "scopes": ["api", "read_user"]}
    )
    assert token in user.impersonationtokens.list(state="active")
    token.delete()
    assert token not in user.impersonationtokens.list(state="active")
    assert token in user.impersonationtokens.list(state="inactive")