code: def testEndToEnd(self):
      # End-to-end test, the stub problem class creates a .gz file with nps_stub.N
      # example and we check if we're able to process it correctly.
      nps_stub = ProgramSearchAlgolispStub()
      num = 0
      for example in nps_stub.generate_samples(
          None, self.tmp_dir, problem.DatasetSplit.TRAIN
      ):
          # Only one example in 'file', so this is OK.
          self.assertEqual(
              example["inputs"], ProgramSearchAlgolispStub.EXAMPLE_INPUT
          )
  
          self.assertEqual(
              example["targets"],
              ProgramSearchAlgolispStub.EXAMPLE_TARGET,
          )
  
          num += 1
  
      # assert that we have as many examples as there are in the file.
      self.assertEqual(num, nps_stub.N)
  
file_path: tensor2tensor/tensor2tensor/data_generators/program_search_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import gzip
  import os
  import shutil
  import tempfile
  from builtins import bytes
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import program_search
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling the ProgramSearchAlgolispTest obj's underlying member method code with example usage: obj.testEndToEnd() without return types