This needs to use a Python lambda.