Question on response() method in a SmartThings driver .

I am trying to adapt some SmartThings code to Hubitat. I came across the following section of code which uses a response() method

			result << response(secure(zwave.associationV1.associationSet(groupingIdentifier:1, nodeId:zwaveHubNodeId)))
			result << response(zwave.associationV1.associationSet(groupingIdentifier:2, nodeId:zwaveHubNodeId))
			result << response(secure(zwave.associationV1.associationGet(groupingIdentifier:1)))

It looks to me like the response() method in this code must be sending the command to the device, but then waits for the response - i.e., without having to have an explicit zwaveEventHandler. Essentially, making an asynchronous operation appear synchronous. Does anybody know - is that what is happening? Is there something similar in Hubitat?

I've been using much more complex code to wait for asynchronous responses after sending calls to zwave devices. Wondering if there's a better way.