code: def test_classification(tmpdir):
      csv_path = csv_data(tmpdir)
  
      data = TextClassificationData.from_csv(
          "sentence",
          "label",
          train_file=csv_path,
          num_workers=0,
          batch_size=2,
      )
      model = TextClassifier(2, TEST_BACKBONE)
      trainer = Trainer(default_root_dir=tmpdir, fast_dev_run=True)
      trainer.fit(model, datamodule=data)
  
file_path: lightning-flash/tests/text/classification/test_data_model_integration.py
imports: import os
  from pathlib import Path
  import pytest
  from flash.core.trainer import Trainer
  from flash.core.utilities.imports import _TOPIC_TEXT_AVAILABLE
  from flash.text import TextClassificationData, TextClassifier
label_desc: Use image node_id 2 for calling a global function with example usage: test_classification(tmpdir) without return types