code: def dali_pipe_deprecated(
      dataset_kwargs,
      shapes,
      tf_type,
      dali_type,
      batch,
      expected_warnings_count,
  ):
      class TestPipeline(pipeline.Pipeline):
          def __init__(self, **kwargs):
              super(TestPipeline, self).__init__(**kwargs)
              self.constant = ops.Constant(
                  dtype=dali_type, idata=[1, 1], shape=[2]
              )
  
          def define_graph(self):
              return self.constant().gpu()
  
      pipe = TestPipeline(batch_size=batch, seed=0)
      with warnings.catch_warnings(record=True) as w:
          warnings.simplefilter("always")
          ds = dali_tf.DALIDataset(
              pipe, batch_size=batch, **dataset_kwargs
          )
          assert_equals(len(w), expected_warnings_count)
          ds_iter = iter(ds)
          for _ in range(10):
              (out,) = ds_iter.next()
              if isinstance(shapes, int) or len(shapes) == 1:
                  assert_equals(out.shape, (2,))
              else:
                  assert_equals(out.shape, (batch, 2))
              assert_equals(out.dtype, tf_type)
  
imports: import tensorflow
  import nvidia.dali.ops
  import nvidia.dali.pipeline
  import nvidia.dali.plugin.tf
  import nvidia.dali.types
  from test_utils_tensorflow import skip_for_incompatible_tf
  import os
  from nose.tools import assert_equals
  from nose_utils import raises
  import itertools
  import warnings
label_desc: Use image node_id 16 for calling a global function with example usage: dali_pipe_deprecated(dataset_kwargs, shapes, tf_type, dali_type, batch, expected_warnings_count) and returns: self