code: def test_only_embedding(backbone, embedding_size):
      datamodule = ImageClassificationData.from_datasets(
          predict_dataset=FakeData(8),
          batch_size=4,
          transform_kwargs={"image_size": (224, 224)},
      )
  
      embedder = ImageEmbedder(backbone=backbone)
      trainer = flash.Trainer()
  
      predictions = trainer.predict(embedder, datamodule=datamodule)
      for prediction_batch in predictions:
          for prediction in prediction_batch:
              assert prediction.size(0) == embedding_size
  
file_path: lightning-flash/tests/image/embedding/test_model.py
imports: from typing import Any
  import flash
  import pytest
  import torch
  from flash.core.utilities.imports import _TOPIC_IMAGE_AVAILABLE, _TORCHVISION_AVAILABLE, _VISSL_AVAILABLE
  from flash.image import ImageClassificationData, ImageEmbedder
  from torch import Tensor
  from tests.helpers.task_tester import TaskTester
label_desc: Use image node_id 3 for calling a global function with example usage: test_only_embedding(backbone, embedding_size) without return types