code: def _check_repeat_last_var_batch(device):
      @pipeline_def
      def pipeline():
          es = fn.external_source(
              name="es", repeat_last=True, device=device
          )
          u = fn.random.uniform(range=(0, 0.01))
          return es, u
  
      pipe = pipeline(
          batch_size=4,
          num_threads=4,
          device_id=0,
          prefetch_queue_depth=2,
      )
      pipe.build()
      data1 = [
          np.array([1], dtype=np.int32),
          np.array([3], dtype=np.int32),
          np.array([42], dtype=np.int32),
          np.array([666], dtype=np.int32),
      ]
      data2 = [
          np.array([11], dtype=np.int32),
          np.array([33], dtype=np.int32),
          np.array([422], dtype=np.int32),
      ]
      pipe.feed_input("es", data1)
  
      a, b = pipe.run()
      check_batch(a, data1)
      assert len(b) == len(data1)
  
      a, b = pipe.run()
      check_batch(a, data1)
      assert len(b) == len(data1)
  
      pipe.feed_input("es", data2)
      a, b = pipe.run()
      check_batch(a, data1)  # <- still the old value
      assert len(b) == len(data1)
  
      a, b = pipe.run()  # <- new value visible
      check_batch(a, data2)
      assert len(b) == len(data2)
  
      pipe.feed_input("es", data1)
      a, b = pipe.run()
      check_batch(
          a, data2
      )  # <- still 2, the most recent change not visible
      assert len(b) == len(data2)
  
      a, b = pipe.run()  # <- new value visible
      check_batch(a, data1)
      assert len(b) == len(data1)
  
imports: import random
  import nvidia.dali.fn
  import nvidia.dali.ops
  import nvidia.dali.types
  import numpy
  from nvidia.dali import Pipeline, pipeline_def
  from test_utils import check_batch
  from nose_utils import raises, assert_warns, assert_raises
  from nvidia.dali.types import DALIDataType
  from numpy.random import default_rng
label_desc: Use image node_id 35 for calling a global function with example usage: _check_repeat_last_var_batch(device) and returns: es,  u