code: def test_embedder_raising_overhead():
      """Tests that embedding to the output layer of a 3 layer model takes less than 10ms more than the time taken to
      execute the model without the embedder.
  
      Note that this bound is intentionally high in an effort to reduce the flakiness of the test.
  
      """
      model = NLayerModel(10)
      embedder = Embedder(model, "output")
  
      start = time.perf_counter()
      model.predict_step(torch.rand(10, 1000), 0, 0)
      end = time.perf_counter()
  
      model_time = end - start
  
      start = time.perf_counter()
      embedder.predict_step(torch.rand(10, 1000), 0, 0)
      end = time.perf_counter()
  
      embedder_time = end - start
  
      assert abs(embedder_time - model_time) < 0.05
  
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 3 for calling a global function with example usage: test_embedder_raising_overhead() without return types