code: def test_ad_hoc_dataset_download(tmpdir, dataset_name, size):
      dataset_config = ludwig.datasets._get_dataset_config(dataset_name)
      assert isinstance(dataset_config, DatasetConfig)
  
      ludwig_dataset = ludwig.datasets.get_dataset(
          dataset_name, cache_dir=tmpdir
      )
      df = ludwig_dataset.load()
      assert df is not None
      assert len(df) >= size
  
file_path: ludwig/tests/ludwig/datasets/test_datasets.py
imports: import io
  import os
  import uuid
  from unittest import mock
  import pandas
  import pytest
  import ludwig.datasets
  from ludwig.api import LudwigModel
  from ludwig.datasets.dataset_config import DatasetConfig
  from ludwig.datasets.loaders.dataset_loader import DatasetState
  from tests.integration_tests.utils import private_test
label_desc: Use image node_id 7 for calling a global function with example usage: test_ad_hoc_dataset_download(tmpdir, dataset_name, size) without return types