code: def testFromGeneratorShapeError(self):
      def generator():
          yield np.array([1, 2, 3], dtype=np.int64)
          yield np.array([4, 5, 6], dtype=np.int64)
          yield np.array([7, 8, 9, 10], dtype=np.int64)
          yield np.array([11, 12, 13], dtype=np.int64)
  
      dataset = dataset_ops.Dataset.from_generator(
          generator, output_types=dtypes.int64, output_shapes=[3]
      )
      get_next = self.getNext(dataset)
  
      self.assertAllEqual([1, 2, 3], self.evaluate(get_next()))
      self.assertAllEqual([4, 5, 6], self.evaluate(get_next()))
      with self.assertRaises(errors.InvalidArgumentError):
          self.evaluate(get_next())
      self.assertAllEqual([11, 12, 13], self.evaluate(get_next()))
      with self.assertRaises(errors.OutOfRangeError):
          self.evaluate(get_next())
  
imports: import threading
  from absl.testing import parameterized
  import numpy
  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.framework import combinations
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.ops import script_ops
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.platform import test
label_desc: Use image node_id 12 for calling the FromGeneratorTest obj's underlying member method code with example usage: obj.testFromGeneratorShapeError() without return types