code: def test_embedder(layer, size):
      """Tests that the embedder ``predict_step`` correctly returns the output from the requested layer."""
      model = EmbedderTestModel(
          nn.Sequential(
              nn.Linear(10, 20),
              nn.Linear(20, 30),
              nn.Linear(30, 40),
          )
      )
  
      embedder = Embedder(model, layer)
  
      assert (
          embedder.predict_step(torch.rand(10, 10), 0, 0).size(1)
          == size
      )
      assert embedder(torch.rand(10, 10)).size(1) == size
  
file_path: lightning-flash/tests/core/utilities/test_embedder.py
imports: import time
  import pytest
  import torch
  from flash.core.utilities.embedder import Embedder
  from flash.core.utilities.imports import _TOPIC_CORE_AVAILABLE
  from pytorch_lightning import LightningModule
  from torch import nn
label_desc: Use image node_id 1 for calling a global function with example usage: test_embedder(layer, size) without return types