code: def _mock_mnist_data(mock_spec):
      """
      Creates a mock data dictionary with train and test sets, each containing 5 mock pairs:
  
          ``(random images, random digit)``.
      """
      bogus_data = {"train": [], "test": []}
  
      for dset, data in bogus_data.items():
          for _ in range(mock_spec[dset]):
              pair = (
                  MockDataObj(
                      np.random.randint(
                          0, 255, size=MOCK_IMAGE_SIZE, dtype=np.uint8
                      )
                  ),
                  np.random.randint(0, 9),
              )
              data.append(pair)
  
      return bogus_data
  
file_path: petastorm/examples/mnist/tests/conftest.py
imports: import numpy
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: _mock_mnist_data(mock_spec) and returns: bogus_data