Refactor callback setup in to use lambda instead of eval
Merge pull request #17114 from pabloh/replace_use_of_eval_with_lambda

Refactor callback setup to use lambda instead of eval