'Helper function to test create_input_fn with keyword arguments'

def _test_with_args(self, **kwargs):

    (sources_file, targets_file) = test_utils.create_temp_parallel_data(sources=[u'Hello    World    .'], targets=[u'Goodbye    .'])
    pipeline = input_pipeline.ParallelTextInputPipeline(params={u'source_files': [sources_file.name], u'target_files': [targets_file.name]}, mode=tf.contrib.learn.ModeKeys.TRAIN)
    input_fn = training_utils.create_input_fn(pipeline=pipeline, **kwargs)
    (features, labels) = input_fn()
    with self.test_session() as sess:
        with tf.contrib.slim.queues.QueueRunners(sess):
            (features_, labels_) = sess.run([features, labels])
    self.assertEqual(set(features_.keys()), set([u'source_tokens', u'source_len']))
    self.assertEqual(set(labels_.keys()), set([u'target_tokens', u'target_len']))
