code: def testGraphMode(self):
      dataset = dataset_ops.Dataset.range(1000)
      with self.assertRaisesRegex(
          RuntimeError,
          "OwnedMultiDeviceIterator is only supported inside of tf.function or "
          "when eager execution is enabled.",
      ):
          multi_device_iterator_ops.OwnedMultiDeviceIterator(
              dataset, devices=[self._devices[1], self._devices[2]]
          )
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.data.experimental.ops import testing
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import from_generator_op
  from tensorflow.python.data.ops import multi_device_iterator_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.eager import cancellation
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import executor
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.ops import data_flow_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 10 for calling the OwnedMultiDeviceIteratorTest obj's underlying member method code with example usage: obj.testGraphMode() without return types