code: def testExtraElementSpecInput(self):
      dataset = dataset_ops.Dataset.range(1000)
      with self.assertRaisesRegex(
          ValueError,
          "When `dataset` is provided, `element_spec` and `components` must "
          "not be specified.",
      ):
          multi_device_iterator_ops.OwnedMultiDeviceIterator(
              dataset,
              devices=[self._devices[1], self._devices[2]],
              element_spec=dataset.element_spec,
          )
  
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 9 for calling the OwnedMultiDeviceIteratorTest obj's underlying member method code with example usage: obj.testExtraElementSpecInput() without return types