code: def test_from_data_frame():
      dm = TextClassificationData.from_data_frame(
          "sentence",
          "lab1",
          train_data_frame=TEST_DATA_FRAME_DATA,
          val_data_frame=TEST_DATA_FRAME_DATA,
          test_data_frame=TEST_DATA_FRAME_DATA,
          predict_data_frame=TEST_DATA_FRAME_DATA,
          batch_size=1,
      )
  
      batch = next(iter(dm.train_dataloader()))
      assert batch[DataKeys.TARGET].item() in [0, 1]
      assert isinstance(batch[DataKeys.INPUT][0], str)
  
      batch = next(iter(dm.val_dataloader()))
      assert batch[DataKeys.TARGET].item() in [0, 1]
      assert isinstance(batch[DataKeys.INPUT][0], str)
  
      batch = next(iter(dm.test_dataloader()))
      assert batch[DataKeys.TARGET].item() in [0, 1]
      assert isinstance(batch[DataKeys.INPUT][0], str)
  
      batch = next(iter(dm.predict_dataloader()))
      assert isinstance(batch[DataKeys.INPUT][0], str)
  
imports: import os
  from pathlib import Path
  import pandas
  import pytest
  from flash.core.data.io.input import DataKeys
  from flash.core.utilities.imports import _TOPIC_TEXT_AVAILABLE
  from flash.text import TextClassificationData
label_desc: Use image node_id 13 for calling a global function with example usage: test_from_data_frame() without return types