code: def _wait_to_write(arr):
      if not isinstance(arr, mx.nd.NDArray):
          raise RuntimeError("Can only wait for NDArray")
      mx.base._LIB.MXNDArrayWaitToWrite(arr.handle)
  
imports: from nvidia.dali.backend import TensorGPU, TensorListGPU
  from nvidia.dali import types
  from nvidia.dali.plugin.base_iterator import _DaliBaseIterator
  from nvidia.dali.plugin.base_iterator import LastBatchPolicy
  import mxnet
  import ctypes
  import numpy
  from collections.abc import Iterable
label_desc: Use image node_id 1 for calling a global function with example usage: _wait_to_write(arr) without return types