Adding a new I2C device - test for NACK/ACK

I’m trying to add a new device that requires a NACK/ACK test prior to transmitting/reading data. The picture below shows how this procedure must be done. However, I can’t seem to find a function in the ArduPilot code that could send only the address with an empty message and listen to the sensor’s response. Can anyone please help me overcome this?