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

    Creates a mock data dictionary with train and test sets, each containing 5 mock pairs:

        ``(random images, random digit)``.
    
examples/mnist/tests/conftest.py