@quachpas wrote a very detailed answer about locate
: How to use context instead of a callback function in locate function calls? - #2 by quachpas
.display(...)
is contextual and needs to be called with the context
keyword: context ap.display("a)")