code: def test_generate_mnist_dataset(generate_mnist_dataset):
      train_path = os.path.join(generate_mnist_dataset, "train")
      assert os.path.exists(train_path)
      assert os.path.exists(
          os.path.join(train_path, "_common_metadata")
      )
  
      test_path = os.path.join(generate_mnist_dataset, "test")
      assert os.path.exists(test_path)
      assert os.path.exists(os.path.join(test_path, "_common_metadata"))
  
file_path: petastorm/examples/mnist/tests/test_pytorch_mnist.py
imports: import logging
  import os
  import unittest
  import pyarrow
  import torch
  import pytest
  import examples.mnist.pytorch_example
  from examples.mnist.generate_petastorm_mnist import mnist_data_to_petastorm_dataset, download_mnist_data
  from examples.mnist.tests.conftest import SMALL_MOCK_IMAGE_COUNT
  from petastorm import make_reader, TransformSpec
label_desc: Use image node_id 4 for calling a global function with example usage: test_generate_mnist_dataset(generate_mnist_dataset) without return types