Which "write" function is invoked when executing ap.write()?

In reply to Marina:

Look at the source code for the analysis_port (src/tlm1/uvm_analysis_port.svh).