code: def test_dataset():
      """test_dataset"""
      filename = os.path.join(
          os.path.dirname(os.path.abspath(__file__)),
          "test_parquet",
          "parquet_cpp_example.parquet.tar.gz",
      )
      filename = "file://" + filename
  
      # This is a demo implementation of ArchiveDataset
      dataset = (
          tf.compat.v2.data.Dataset.from_tensor_slices([filename])
          .map(
              lambda f: ()
              + (f,)
              + archive_io.list_archive_entries(f, "tar.gz")
          )
          .map(
              lambda f, format, e: (
                  tf.broadcast_to(f, tf.shape(e)),
                  tf.broadcast_to(format, tf.shape(e)),
                  e,
              )
          )
          .apply(tf.data.experimental.unbatch())
          .map(archive_io.read_archive)
      )
  
      expected_filename = os.path.join(
          os.path.dirname(os.path.abspath(__file__)),
          "test_parquet",
          "parquet_cpp_example.parquet",
      )
      expected_filename = "file://" + expected_filename
  
      i = 0
      for entry in dataset:
          assert (
              entry.numpy()
              == tf.io.read_file(expected_filename).numpy()
          )
          i += 1
      assert i == 2
  
imports: import os
  import tensorflow
  import tensorflow_io.python.ops.archive_ops
label_desc: Use image node_id 4 for calling a global function with example usage: test_dataset() without return types