code: def test_vissl_training(
      backbone,
      training_strategy,
      head,
      pretraining_transform,
      embedding_size,
  ):
      datamodule = ImageClassificationData.from_datasets(
          train_dataset=FakeData(16),
          predict_dataset=FakeData(8),
          batch_size=4,
      )
  
      embedder = ImageEmbedder(
          backbone=backbone,
          training_strategy=training_strategy,
          head=head,
          pretraining_transform=pretraining_transform,
      )
  
      trainer = flash.Trainer(
          max_steps=3,
          max_epochs=1,
          gpus=torch.cuda.device_count(),
      )
  
      trainer.fit(embedder, datamodule=datamodule)
      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 1 for calling a global function with example usage: test_vissl_training(backbone, training_strategy, head, pretraining_transform, embedding_size) without return types