import tensorflow as tf

  def test_get_inputs_cancelled(self):
    with tf.Graph().as_default():

      @dynamic_batching.batch_fn
      def f(a):
        return a

      f(tf.constant([1]))

      # Intentionally using tf.Session() instead of self.test_session() to have
      # control over closing the session. test_session() is a cached session.
      with tf.Session():
        coord = tf.train.Coordinator()
        tf.train.start_queue_runners(coord=coord)
