code: def external_dataset(tmpdir_factory):
      path = tmpdir_factory.mktemp("data").strpath
      url = "file://" + path
  
      generate_external_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/external_dataset/tests/test_generate_external_dataset.py
imports: import os
  import unittest
  import pytest
  from examples.hello_world.external_dataset.generate_external_dataset import generate_external_dataset
  from examples.hello_world.external_dataset.python_hello_world import python_hello_world
  from examples.hello_world.external_dataset.pytorch_hello_world import pytorch_hello_world
  from examples.hello_world.external_dataset.tensorflow_hello_world import tensorflow_hello_world
  from petastorm import make_batch_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: external_dataset(tmpdir_factory) and returns: dataset