code: def test_from_csv(tmpdir):
      train_csv = Path(tmpdir) / "train.csv"
      val_csv = test_csv = Path(tmpdir) / "valid.csv"
      TEST_DF_1.to_csv(train_csv)
      TEST_DF_2.to_csv(val_csv)
      TEST_DF_2.to_csv(test_csv)
  
      dm = TabularClassificationData.from_csv(
          categorical_fields=["category"],
          numerical_fields=["scalar_a", "scalar_b"],
          target_fields="label",
          train_file=str(train_csv),
          val_file=str(val_csv),
          test_file=str(test_csv),
          num_workers=0,
          batch_size=1,
      )
      for dl in [
          dm.train_dataloader(),
          dm.val_dataloader(),
          dm.test_dataloader(),
      ]:
          data = next(iter(dl))
          (cat, num) = data[DataKeys.INPUT]
          target = data[DataKeys.TARGET]
          assert cat.shape == (1, 1)
          assert num.shape == (1, 2)
          assert target.shape == (1,)
  
file_path: lightning-flash/tests/tabular/classification/test_data.py
imports: from pathlib import Path
  from unittest.mock import Mock
  import numpy
  import pytest
  from flash.core.data.io.input import DataKeys
  from flash.core.utilities.imports import _TOPIC_TABULAR_AVAILABLE
label_desc: Use image node_id 7 for calling a global function with example usage: test_from_csv(tmpdir) without return types