code: def testSimpleOneDimensional(self, dtype):
      with self.session():
          data = constant_op.constant(
              [0, 13, 2, 39, 4, 17], dtype=dtype
          )
          indices = constant_op.constant([0, 0, 2, 3, 2, 1])
          partitions = data_flow_ops.dynamic_partition(
              data, indices, num_partitions=4
          )
          partition_vals = self.evaluate(partitions)
  
      self.assertEqual(4, len(partition_vals))
      self.assertAllEqual([0, 13], partition_vals[0])
      self.assertAllEqual([17], partition_vals[1])
      self.assertAllEqual([2, 4], partition_vals[2])
      self.assertAllEqual([39], partition_vals[3])
      # Vector data input to DynamicPartition results in
      # `num_partitions` vectors of unknown length.
      self.assertEqual([None], partitions[0].get_shape().as_list())
      self.assertEqual([None], partitions[1].get_shape().as_list())
      self.assertEqual([None], partitions[2].get_shape().as_list())
      self.assertEqual([None], partitions[3].get_shape().as_list())
  
imports: import unittest
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.framework import config
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import data_flow_ops
  from tensorflow.python.ops import gradients_impl
  import tensorflow.python.ops.data_flow_grad
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the DynamicPartitionTest obj's underlying member method code with example usage: obj.testSimpleOneDimensional(dtype) without return types