code: def testUnknownShape(self):
      with self.cached_session():
          logits = array_ops.placeholder(dtype=dtypes.float32)
          dist = categorical.Categorical(logits)
          sample = dist.sample()
          # Will sample class 1.
          sample_value = sample.eval(
              feed_dict={logits: [-1000.0, 1000.0]}
          )
          self.assertEqual(1, sample_value)
  
          # Batch entry 0 will sample class 1, batch entry 1 will sample class 0.
          sample_value_batch = sample.eval(
              feed_dict={logits: [[-1000.0, 1000.0], [1000.0, -1000.0]]}
          )
          self.assertAllEqual([1, 0], sample_value_batch)
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops.distributions import categorical
  from tensorflow.python.ops.distributions import kullback_leibler
  from tensorflow.python.ops.distributions import normal
  from tensorflow.python.platform import test
label_desc: Use image node_id 5 for calling the CategoricalTest obj's underlying member method code with example usage: obj.testUnknownShape() without return types