code: def test_predict(tmpdir):
      datamodule = TextClassificationData.from_lists(
          predict_data=predict_data, batch_size=4
      )
      model = TextEmbedder(backbone=TEST_BACKBONE)
  
      trainer = flash.Trainer(gpus=torch.cuda.device_count())
      predictions = trainer.predict(model, datamodule=datamodule)
      assert [t.size() for t in predictions[0]] == [
          torch.Size([384]),
          torch.Size([384]),
          torch.Size([384]),
      ]
  
file_path: lightning-flash/tests/text/embedding/test_model.py
imports: import os
  from typing import Any
  import flash
  import pytest
  import torch
  from flash.core.utilities.imports import _TOPIC_TEXT_AVAILABLE
  from flash.text import TextClassificationData, TextEmbedder
  from torch import Tensor
  from tests.helpers.task_tester import TaskTester
label_desc: Use image node_id 1 for calling a global function with example usage: test_predict(tmpdir) without return types