code: def test_feature_share_speed():
      """Test that the feature share wrapper is faster than the metric collection."""
      mc = MetricCollection(
          [
              FrechetInceptionDistance(),
              InceptionScore(),
              KernelInceptionDistance(),
          ]
      )
      fs = FeatureShare(
          [
              FrechetInceptionDistance(),
              InceptionScore(),
              KernelInceptionDistance(),
          ]
      )
      x = torch.randint(255, (1, 3, 64, 64), dtype=torch.uint8)
  
      import time
  
      start = time.time()
      for _ in range(10):
          x = torch.randint(255, (1, 3, 64, 64), dtype=torch.uint8)
          mc.update(x, real=True)
      end = time.time()
      mc_time = end - start
  
      start = time.time()
      for _ in range(10):
          x = torch.randint(255, (1, 3, 64, 64), dtype=torch.uint8)
          fs.update(x, real=True)
      end = time.time()
      fs_time = end - start
  
      assert (
          fs_time < mc_time
      ), "The feature share wrapper should be faster than the metric collection."
  
file_path: torchmetrics/tests/unittests/wrappers/test_feature_share.py
imports: import pytest
  import torch
  from torchmetrics import MetricCollection
  from torchmetrics.image import FrechetInceptionDistance, InceptionScore, KernelInceptionDistance, LearnedPerceptualImagePatchSimilarity, StructuralSimilarityIndexMeasure
  from torchmetrics.wrappers import FeatureShare
label_desc: Use image node_id 4 for calling a global function with example usage: test_feature_share_speed() without return types