code: def petastorm_dataset(tmpdir_factory):
      path = tmpdir_factory.mktemp("data").strpath
      url = "file://" + path
  
      generate_petastorm_dataset(url)
  
      dataset = SyntheticDataset(url=url, path=path, data=None)
  
      # Generate a dataset
      assert os.path.exists(os.path.join(path, "_SUCCESS"))
  
      return dataset
  
file_path: petastorm/examples/hello_world/petastorm_dataset/tests/test_generate_petastorm_dataset.py
imports: import os
  import unittest
  import pytest
  from examples.hello_world.petastorm_dataset.generate_petastorm_dataset import generate_petastorm_dataset
  from examples.hello_world.petastorm_dataset.pyspark_hello_world import pyspark_hello_world
  from examples.hello_world.petastorm_dataset.pytorch_hello_world import pytorch_hello_world
  from examples.hello_world.petastorm_dataset.tensorflow_hello_world import tensorflow_hello_world
  from petastorm import make_reader
  from petastorm.tests.conftest import SyntheticDataset
  from petastorm.tests.test_tf_utils import create_tf_graph
label_desc: Use image node_id 1 for calling a global function with example usage: petastorm_dataset(tmpdir_factory) and returns: dataset