code: def test_from_data_frame_multilabel():
      dm = TextClassificationData.from_data_frame(
          "sentence",
          ["lab1", "lab2"],
          train_data_frame=TEST_DATA_FRAME_DATA_MULTILABEL,
          val_data_frame=TEST_DATA_FRAME_DATA_MULTILABEL,
          test_data_frame=TEST_DATA_FRAME_DATA_MULTILABEL,
          predict_data_frame=TEST_DATA_FRAME_DATA_MULTILABEL,
          batch_size=1,
      )
  
      assert dm.multi_label
  
      batch = next(iter(dm.train_dataloader()))
      assert all(label in [0, 1] for label in batch[DataKeys.TARGET][0])
      assert isinstance(batch[DataKeys.INPUT][0], str)
  
      batch = next(iter(dm.val_dataloader()))
      assert all(label in [0, 1] for label in batch[DataKeys.TARGET][0])
      assert isinstance(batch[DataKeys.INPUT][0], str)
  
      batch = next(iter(dm.test_dataloader()))
      assert all(label in [0, 1] for label in batch[DataKeys.TARGET][0])
      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 14 for calling a global function with example usage: test_from_data_frame_multilabel() without return types