code: def testInterleaveDatasetError(
      self, input_values, cycle_length, block_length, num_parallel_calls
  ):
      dataset = (
          dataset_ops.Dataset.from_tensor_slices(input_values)
          .map(lambda x: array_ops.check_numerics(x, "message"))
          .interleave(
              dataset_ops.Dataset.from_tensors,
              cycle_length,
              block_length,
              num_parallel_calls,
          )
      )
      get_next = self.getNext(dataset)
  
      for value in input_values:
          if np.isnan(value):
              with self.assertRaises(errors.InvalidArgumentError):
                  self.evaluate(get_next())
          else:
              self.assertEqual(value, self.evaluate(get_next()))
      with self.assertRaises(errors.OutOfRangeError):
          self.evaluate(get_next())
  
imports: import multiprocessing
  import os
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.data.experimental.ops import testing
  from tensorflow.python.data.kernel_tests import checkpoint_test_base
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the InterleaveTest obj's underlying member method code with example usage: obj.testInterleaveDatasetError(input_values, cycle_length, block_length, num_parallel_calls) without return types